Skip to content

Commit

Permalink
bgpd: extend make_prefix to form srv6-based prefix
Browse files Browse the repository at this point in the history
Enable the SRv6 SID prefix generation in make_prefix()
function of bgp_nht.c.

Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>

fixup: bgpd: extend make_prefix to form srv6-based prefix
  • Loading branch information
dmytroshytyi-6WIND committed Jan 30, 2024
1 parent f49fc76 commit 26c747e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bgpd/bgp_nht.c
Original file line number Diff line number Diff line change
Expand Up @@ -1045,8 +1045,11 @@ static int make_prefix(int afi, struct bgp_path_info *pi, struct prefix *p)
break;
case AFI_IP6:
p->family = AF_INET6;

if (is_bgp_static) {
if (pi->attr && pi->attr->srv6_l3vpn) {
IPV6_ADDR_COPY(&(p->u.prefix6),
&(pi->attr->srv6_l3vpn->sid));
p->prefixlen = IPV6_MAX_BITLEN;
} else if (is_bgp_static) {
p->u.prefix6 = p_orig->u.prefix6;
p->prefixlen = p_orig->prefixlen;
} else {
Expand Down

0 comments on commit 26c747e

Please sign in to comment.