]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: fix vpnv6 nexthop encoding
authorPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 19 Jan 2023 10:04:37 +0000 (11:04 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Fri, 20 Jan 2023 07:22:20 +0000 (08:22 +0100)
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 <philippe.guibert@6wind.com>
bgpd/bgp_attr.c

index 4306d3bd121451f6a406e7d24354d63b86ea2dfc..e60c1bb8dc490b7fb87ff9821cd50eb0dfa66baf 100644 (file)
@@ -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);