Commit 0c644cf532 for frr
commit 0c644cf532fd70d56860de0fb268fa68e1fa2bf4
Author: souroy <souroy@nvidia.com>
Date: Fri Sep 18 12:19:30 2026 -0700
bgpd: Fix v6 connected prefix lookup for connection bind
The bind-point lookup passed the base of the sockaddr to
if_lookup_address() instead of the IPv6 address field, so the
connected prefix was never matched. Pass sin6.sin6_addr instead.
This corrects an oversight introduced by commit 719313d5dd ("bgpd:
Ensure that BGP binds to connection addresses that it can").
Signed-off-by: souroy <souroy@nvidia.com>
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index 6a143d96ed..3c59a9593c 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -778,7 +778,7 @@ static char *bgp_get_bound_name(struct peer_connection *connection)
* some random source address to be choosen.
*/
if (connection->su.sa.sa_family == AF_INET6) {
- c = if_lookup_address(&connection->su.sa, connection->su.sa.sa_family,
+ c = if_lookup_address(&connection->su.sin6.sin6_addr, connection->su.sa.sa_family,
peer->bgp->vrf_id);
if (c)
return c->ifp->name;