]> git.proxmox.com Git - mirror_frr.git/commit
bgpd: fix when route-map changes the link local nexthop for vpnv6
authorPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 23 Jan 2023 15:31:12 +0000 (16:31 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 24 Jan 2023 07:04:27 +0000 (08:04 +0100)
commit9795e9f23465f26628a75be15771a01427336dad
tree09243bee9551302d0c8e126334ba2cecbac3e83c
parentf7a0eb6a1736e85b5991ffc919805b812a6d7576
bgpd: fix when route-map changes the link local nexthop for vpnv6

This fix updates the nexthop length of a bgp update to be
transmitted to a remote peer. Before the previous commit,
the ipv6 nexthop length was internally set to 32 bytes which
was not correct, as it should be 48 bytes which is conform
to the vpnv6 encoding format.

However, without the previous match, even if internally, the
nexthop length was set to 32, the real nexthop length was set
to 48 bytes, and everything was operating ok.

Now, if we use the following route-map, and attach it to
outgoing for vpnv6 address family, then we have a malformed
packet detected, and the peering breaks.

 > route-map rmap permit 1
 > set ipv6 next-hop global 5:5::3:6
 > set ipv6 next-hop local fe80:55::333:222

Maintain the mp_nexthop_len to 48 bytes if it was already set
to 48 previously.

Fixes: 35ac9b53f2e2 ("bgpd: fix vpnv6 nexthop encoding")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd/bgp_routemap.c