summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2017-05-10 19:27:33 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-05-11 14:24:38 +0200
commit42025b43f265c042116d9432cf4d34aeb79152f6 (patch)
tree0c2a42724df456cfd1226cea74a1b8da571d4e75
parentadded troubleshooting section to debian 8 build doc (diff)
downloadfrr-42025b43f265c042116d9432cf4d34aeb79152f6.tar.xz
frr-42025b43f265c042116d9432cf4d34aeb79152f6.zip
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 <philippe.guibert@6wind.com>
-rw-r--r--bgpd/bgp_attr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index 1fccd25c8..61dcbd1b2 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -2737,8 +2737,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 */
switch (nh_afi)