summaryrefslogtreecommitdiff
path: root/bgpd/bgp_keepalives.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-08-26 21:34:59 -0400
committerDonald Sharp <sharpd@nvidia.com>2023-09-10 08:31:25 -0400
commitd1e7215da064eab02be7c1874cab27a6b7d0cacf (patch)
treede4e739a18d63a287e600518e9483544bee8584e /bgpd/bgp_keepalives.c
parent1f8274e050aefeaf4f8706d6e9a7a2706e44629a (diff)
bgpd: make bgp_keepalives_on|off connection oriented
The bgp_keepalives_on|off functions should use a peer_connection as a basis for it's operation. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgp_keepalives.c')
-rw-r--r--bgpd/bgp_keepalives.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bgpd/bgp_keepalives.c b/bgpd/bgp_keepalives.c
index 48bde1220d..92123c2cd9 100644
--- a/bgpd/bgp_keepalives.c
+++ b/bgpd/bgp_keepalives.c
@@ -229,8 +229,10 @@ void *bgp_keepalives_start(void *arg)
/* --- thread external functions ------------------------------------------- */
-void bgp_keepalives_on(struct peer *peer)
+void bgp_keepalives_on(struct peer_connection *connection)
{
+ struct peer *peer = connection->peer;
+
if (CHECK_FLAG(peer->thread_flags, PEER_THREAD_KEEPALIVES_ON))
return;
@@ -258,8 +260,10 @@ void bgp_keepalives_on(struct peer *peer)
}
}
-void bgp_keepalives_off(struct peer *peer)
+void bgp_keepalives_off(struct peer_connection *connection)
{
+ struct peer *peer = connection->peer;
+
if (!CHECK_FLAG(peer->thread_flags, PEER_THREAD_KEEPALIVES_ON))
return;