From 35ac9b53f2e2b4d33f9ae7f930df38d15408efa4 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Thu, 19 Jan 2023 11:04:37 +0100 Subject: [PATCH] bgpd: fix vpnv6 nexthop encoding In ipv6 vpn, when the global and the local ipv6 address are received, when re-transmitting the bgp ipv6 update, the nexthop attribute length must still be 48 bytes. Signed-off-by: Philippe Guibert --- bgpd/bgp_attr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 4306d3bd12..e60c1bb8dc 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -4028,8 +4028,8 @@ size_t bgp_packet_mpattr_start(struct stream *s, struct peer *peer, afi_t afi, } } break; case SAFI_MPLS_VPN: { - if (attr->mp_nexthop_len - == BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL) { + if (attr->mp_nexthop_len == + BGP_ATTR_NHLEN_VPNV6_GLOBAL_AND_LL) { stream_putc(s, 48); stream_putl(s, 0); /* RD = 0, per RFC */ stream_putl(s, 0);