From: Philippe Guibert Date: Wed, 10 May 2017 17:27:33 +0000 (+0200) Subject: bgpd: fixup bgpd: allow VPN next hop to be different AFI than NLRI next X-Git-Tag: reindent-master-before~179^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F503%2Fhead;p=mirror%2Ffrr.git bgpd: fixup bgpd: allow VPN next hop to be different AFI than NLRI next hop for EVPN In the case of EVPN, add the nexthop attribute. Signed-off-by: Philippe Guibert --- diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index b2789cd47d..8b4ea9c752 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -2847,8 +2847,9 @@ bgp_packet_mpattr_start (struct stream *s, afi_t afi, safi_t safi, afi_t nh_afi, stream_putw (s, pkt_afi); /* AFI */ stream_putc (s, pkt_safi); /* SAFI */ - - if (nh_afi == AFI_MAX) + if (afi == AFI_L2VPN) + nh_afi = AFI_L2VPN; + else if (nh_afi == AFI_MAX) nh_afi = BGP_NEXTHOP_AFI_FROM_NHLEN(attr->extra->mp_nexthop_len); /* Nexthop */