]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: Only update peer connection information when needed
authorDonald Sharp <sharpd@nvidia.com>
Thu, 9 Jan 2025 17:51:16 +0000 (12:51 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 10 Jan 2025 15:07:11 +0000 (10:07 -0500)
commit348c2dc3f8dc683552c880dfbcb1e0b7dd203692
tree4beaf9de73d3f396f12917043b128f33b97191c8
parent78fa9b6feb0fc0fb0e9c3ff2db571c813e4b88ea
bgpd: Only update peer connection information when needed

Currently bgp is repeatedly grabbing peer connection information.
This is a bit overkill.  There are two situations:

a) Opening a connection to the peer
   In this case, we know the remote port/address a priori and can get
   the local information by just asking the OS.
b) Peer opening a connection to us.
   In this case, we know the local port/address a priori and can get
   the remote information by just asking the OS.

Modify the code to just grab this data at the appropriate time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgp_fsm.c
bgpd/bgp_network.c
bgpd/bgp_network.h