From 1baeb81632d46c20f7f75e619cfea73784d66c01 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 6 Nov 2024 14:31:19 -0500 Subject: bgpd: bgp_getsockname should use connection Let's use the connection associated with the peer instead. Signed-off-by: Donald Sharp --- bgpd/bgp_packet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bgpd/bgp_packet.c') diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index a76a300c1..e9cc52449 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -2054,7 +2054,7 @@ static int bgp_open_receive(struct peer_connection *connection, return BGP_Stop; /* Get sockname. */ - if (bgp_getsockname(peer) < 0) { + if (bgp_getsockname(connection) < 0) { flog_err_sys(EC_LIB_SOCKET, "%s: bgp_getsockname() failed for peer: %s", __func__, peer->host); -- cgit v1.2.3