summaryrefslogtreecommitdiff
path: root/bgpd/bgp_network.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2024-11-06 14:31:19 -0500
committerDonald Sharp <sharpd@nvidia.com>2024-11-26 11:59:33 -0500
commit1baeb81632d46c20f7f75e619cfea73784d66c01 (patch)
tree3d3b97adae31194994290c886c3a9ed1d48f1a19 /bgpd/bgp_network.c
parent72f716ef2880408a3a6e71691f5c8aae24b059cd (diff)
bgpd: bgp_getsockname should use connection
Let's use the connection associated with the peer instead. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgp_network.c')
-rw-r--r--bgpd/bgp_network.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index 89c71060a2..e6117a5ce0 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -878,8 +878,10 @@ void bgp_updatesockname(struct peer *peer, struct peer_connection *connection)
}
/* After TCP connection is established. Get local address and port. */
-int bgp_getsockname(struct peer *peer)
+int bgp_getsockname(struct peer_connection *connection)
{
+ struct peer *peer = connection->peer;
+
bgp_updatesockname(peer, peer->connection);
if (!bgp_zebra_nexthop_set(peer->su_local, peer->su_remote,