From 39258b50239373c2cc343d4b7f0107bca0a40b8e Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Thu, 3 Jul 2025 17:16:14 +0200 Subject: [PATCH] BGP: Interface range bind For dynamic onlink connections, we need to find out which interface the connection came in, and we need to pin that connection to that interface. To achieve that, we create a listening socket bound to each interface separately, and match the incoming connection by the socket. Otherwise, the kernel would not give us any information on where the connection came from. --- doc/bird.sgml | 12 +++++ proto/bgp/bgp.c | 120 +++++++++++++++++++++++++++++++++++++++------ proto/bgp/bgp.h | 1 + proto/bgp/config.Y | 1 + 4 files changed, 119 insertions(+), 15 deletions(-) diff --git a/doc/bird.sgml b/doc/bird.sgml index 68229cb9d..d75640c6b 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -2945,6 +2945,7 @@ protocol bgp [] { local [] [port ] [as ]; neighbor [ | range ] [onlink] [port ] [as ] [internal|external]; interface ""; + interface range ; onlink ; direct; multihop []; @@ -3067,6 +3068,17 @@ protocol bgp [] { used for non link-local sessions when it is necessary to explicitly specify an interface, but only for direct (not multihop) sessions. +