From: Maria Matejka Date: Tue, 7 Oct 2025 10:30:13 +0000 (+0200) Subject: BGP: strict bind clarification comment X-Git-Tag: v3.2.0~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=daad16acb2933d7609aaf9e52ffc38859aa0f457;p=thirdparty%2Fbird.git BGP: strict bind clarification comment --- diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index 32e61f700..7bd7f3743 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -688,7 +688,11 @@ bgp_open(struct bgp_proto *p) LOCK_DOMAIN(rtable, bgp_listen_domain); struct bgp_listen_request *req = &p->listen; - /* We assume that cf->iface is defined iff cf->local_ip is link-local */ + + /* If strict_bind is set, we need local_ip and maybe also iface. Mandatory if + * local_ip is link-local. If strict_bind is not set, we bind to all addresses + * of that family and match the local IP later when accepting the connection. */ + req->params.iface = p->cf->strict_bind ? p->cf->iface : NULL; req->params.vrf = p->p.vrf; req->params.addr = p->cf->strict_bind ? p->cf->local_ip :