summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorLou Berger <lberger@labn.net>2017-05-11 14:14:33 +0200
committerGitHub <noreply@github.com>2017-05-11 14:14:33 +0200
commitbe4a57d1107d39595bd203c1857e8cda95967f76 (patch)
tree0846affaa19c1a07e332f490e845200074e70d91 /bgpd
parentMerge pull request #496 from donaldsharp/vtysh_pager (diff)
parentbgpd: fixup bgpd: allow VPN next hop to be different AFI than NLRI next (diff)
downloadfrr-be4a57d1107d39595bd203c1857e8cda95967f76.tar.xz
frr-be4a57d1107d39595bd203c1857e8cda95967f76.zip
Merge pull request #503 from pguibert6WIND/issue_473
bgpd: fixup bgpd: allow VPN next hop to be different AFI than NLRI nexthop for EVPN
Diffstat (limited to 'bgpd')
-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 b2789cd47..8b4ea9c75 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 */