X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;ds=sidebyside;f=bgpd%2Fbgp_nht.c;h=e982e1db6a8a638651dde5674a245cb9ed66a5d0;hb=0378bcaad6736940867fc0a0b46e196f3e95d7ce;hp=c5d12a570678febe0aa5bdce7fd7ebef85585db6;hpb=ca6541963cd00cc24d53debee2c570810c609aec;p=mirror_frr.git diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c index c5d12a570..e982e1db6 100644 --- a/bgpd/bgp_nht.c +++ b/bgpd/bgp_nht.c @@ -42,6 +42,7 @@ #include "bgpd/bgp_nht.h" #include "bgpd/bgp_fsm.h" #include "bgpd/bgp_zebra.h" +#include "bgpd/bgp_flowspec_util.h" extern struct zclient *zclient; @@ -533,7 +534,15 @@ static int make_prefix(int afi, struct bgp_path_info *pi, struct prefix *p) && (pi->sub_type == BGP_ROUTE_STATIC)) ? 1 : 0; - + struct bgp_node *net = pi->net; + struct prefix *p_orig = &net->p; + + if (p_orig->family == AF_FLOWSPEC) { + if (!pi->peer) + return -1; + return bgp_flowspec_get_first_nh(pi->peer->bgp, + pi, p); + } memset(p, 0, sizeof(struct prefix)); switch (afi) { case AFI_IP: