From 863bc02029690b45b2ef8a27837c905cb66ea7d3 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Wed, 16 Jul 2025 10:45:10 +0200 Subject: [PATCH] BGP: Fixed link-local connections with wildcard local iface When BGP was configured to accept link-local connections in combination with interface range, it failed to recognize that the incoming connection is indeed for that protocol. --- proto/bgp/bgp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index fb6410ab0..fea51781c 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -1737,7 +1737,7 @@ bgp_find_proto(sock *sk) (!p->cf->remote_range || ipa_in_netX(sk->daddr, p->cf->remote_range)) && (p->p.vrf == sk->vrf) && (p->cf->local_port == sk->sport) && - (!link || (p->cf->iface == sk->iface)) && + (!link || (p->cf->iface == sk->iface) || p->cf->ipatt && sk->iface && iface_patt_match(p->cf->ipatt, sk->iface, NULL)) && (ipa_zero(p->cf->local_ip) || ipa_equal(p->cf->local_ip, sk->saddr))) { best = p; -- 2.47.3