Skip to content

Commit

Permalink
Merge pull request #15542 from pguibert6WIND/bgp_srv6_real_sid
Browse files Browse the repository at this point in the history
bgpd: fix use real SID in BGP nexthop tracking
  • Loading branch information
ton31337 authored Nov 28, 2024
2 parents 855873a + 8b3b152 commit f46e65f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions bgpd/bgp_nht.c
Original file line number Diff line number Diff line change
Expand Up @@ -1066,9 +1066,16 @@ static int make_prefix(int afi, struct bgp_path_info *pi, struct prefix *p)
case AFI_IP6:
p->family = AF_INET6;
if (pi->attr->srv6_l3vpn) {
IPV6_ADDR_COPY(&(p->u.prefix6),
&(pi->attr->srv6_l3vpn->sid));
p->prefixlen = IPV6_MAX_BITLEN;
if (pi->attr->srv6_l3vpn->transposition_len != 0 &&
BGP_PATH_INFO_NUM_LABELS(pi)) {
IPV6_ADDR_COPY(&p->u.prefix6, &pi->attr->srv6_l3vpn->sid);
transpose_sid(&p->u.prefix6,
decode_label(&pi->extra->labels->label[0]),
pi->attr->srv6_l3vpn->transposition_offset,
pi->attr->srv6_l3vpn->transposition_len);
} else
IPV6_ADDR_COPY(&(p->u.prefix6), &(pi->attr->srv6_l3vpn->sid));
} else if (is_bgp_static) {
p->u.prefix6 = p_orig->u.prefix6;
p->prefixlen = p_orig->prefixlen;
Expand Down

0 comments on commit f46e65f

Please sign in to comment.