summaryrefslogtreecommitdiffstats
path: root/bgpd/bgpd.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2024-12-17 21:56:19 +0100
committerDonald Sharp <sharpd@nvidia.com>2025-01-10 16:07:11 +0100
commit78fa9b6feb0fc0fb0e9c3ff2db571c813e4b88ea (patch)
tree05542ed9d58e9304efbd10846f15930561dc069d /bgpd/bgpd.h
parentbgpd: bgp_getsockanme is connection oriented (diff)
downloadfrr-78fa9b6feb0fc0fb0e9c3ff2db571c813e4b88ea.tar.xz
frr-78fa9b6feb0fc0fb0e9c3ff2db571c813e4b88ea.zip
bgpd: su_remote and su_local are properties of the connection
su_local and su_remote in the peer can change based upon if we are initiating the remote connection or receiving it. As such we need to treat it as a property of the connection. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgpd.h')
-rw-r--r--bgpd/bgpd.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index 65b268c4e..c72072852 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -1258,6 +1258,9 @@ struct peer_connection {
union sockunion su;
#define BGP_CONNECTION_SU_UNSPEC(connection) \
(connection->su.sa.sa_family == AF_UNSPEC)
+
+ union sockunion *su_local; /* Sockunion of local address. */
+ union sockunion *su_remote; /* Sockunion of remote address. */
};
extern struct peer_connection *bgp_peer_connection_new(struct peer *peer);
extern void bgp_peer_connection_free(struct peer_connection **connection);
@@ -1350,8 +1353,6 @@ struct peer {
char *update_if;
union sockunion *update_source;
- union sockunion *su_local; /* Sockunion of local address. */
- union sockunion *su_remote; /* Sockunion of remote address. */
bool shared_network; /* Is this peer shared same network. */
struct bgp_nexthop nexthop; /* Nexthop */