diff options
-rw-r--r-- | bgpd/bgp_attr.c | 5 |
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) |