From ddb5fb0fba14a7c2a23fd3eced36dc064fb82242 Mon Sep 17 00:00:00 2001 From: GalaxyGorilla Date: Fri, 26 Jun 2020 09:07:17 +0000 Subject: [PATCH] bgp: remove unneccessary setting of peers Signed-off-by: GalaxyGorilla --- bgpd/bgp_routemap.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 8af33ab998a5..f58a431d2cba 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -1594,23 +1594,15 @@ route_set_srte_color(void *rule, const struct prefix *prefix, { uint32_t *srte_color = rule; struct bgp_path_info *path; - struct peer *peer; if (type != RMAP_BGP) return RMAP_OKAY; path = object; - peer = path->peer; path->attr->srte_color = *srte_color; path->attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_SRTE_COLOR); - if ((CHECK_FLAG(peer->rmap_type, PEER_RMAP_TYPE_IN)) && peer->su_remote - && sockunion_family(peer->su_remote) == AF_INET) { - path->attr->nexthop.s_addr = sockunion2ip(peer->su_remote); - path->attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_NEXT_HOP); - } - return RMAP_OKAY; }