From f4a94644d0d6a4ecdf5fcebb0062bc463fad2a28 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Mon, 24 Mar 2025 17:09:25 +0100 Subject: [PATCH] BGP: Add option to specify format of link-local next hop When a BGP session is established using link-local next hop addresses, there is no global IPv6 address for next hop. Implementations differ on how to encode such next hop. This leads to interoperability problems. Add the option 'link local next hop format' to specify which format to use when encoding such next hops. Based on a patch from Andrey V. Elsukov and Georgy Kirichenko, submitted by Aleksandr Stepanov, thanks! --- doc/bird.sgml | 13 +++++++++++++ lib/alloca.h | 2 ++ proto/bgp/bgp.c | 1 + proto/bgp/bgp.h | 6 ++++++ proto/bgp/config.Y | 13 +++++++++++-- proto/bgp/packets.c | 46 +++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 79 insertions(+), 2 deletions(-) diff --git a/doc/bird.sgml b/doc/bird.sgml index 4efca00dd..87317f266 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -3604,6 +3604,18 @@ be used in explicit configuration. enabled a route may end with a link-local immediate next hop when the IGP route has one. Default: disabled. + + For IPv6 routes, BGP assumes that the Next Hop attribute contains a + global IPv6 address (in the first position) and an optional link-local + IPv6 address (in the second position): [