From 01e68ed8a8cc64e0a5ad38a955e3a830071d0d44 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Wed, 10 May 2017 19:27:33 +0200 Subject: [PATCH] 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 --- bgpd/bgp_attr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 */ -- 2.39.5