Skip to content

Commit

Permalink
Merge pull request #25 from opensourcerouting/pathd-pcep-fix_bgp_srte…
Browse files Browse the repository at this point in the history
…_color_route_map

bgp: remove unneccessary setting of peers
  • Loading branch information
rwestphal authored Jun 26, 2020
2 parents ef87269 + ddb5fb0 commit 060e7f8
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions bgpd/bgp_routemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 060e7f8

Please sign in to comment.