From: Ondrej Zajicek Date: Mon, 24 Mar 2025 16:03:41 +0000 (+0100) Subject: BGP: Fix missing case for decoding link-local next hops in VPN SAFI X-Git-Tag: v2.16.2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c172a6ce7222b0afe9fcb99567f469f0084cf2f9;p=thirdparty%2Fbird.git BGP: Fix missing case for decoding link-local next hops in VPN SAFI --- diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index 982108110..dbf079be4 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -1448,6 +1448,9 @@ bgp_decode_next_hop_vpn(struct bgp_parse_state *s, byte *data, uint len, rta *a) nh[0] = ipa_from_ip6(get_ip6(data+8)); nh[1] = ipa_from_ip6(get_ip6(data+32)); + if (ipa_is_link_local(nh[0])) + { nh[1] = nh[0]; nh[0] = IPA_NONE; } + if (ipa_is_ip4(nh[0]) || !ip6_is_link_local(nh[1])) nh[1] = IPA_NONE; }