mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-11-01 12:47:16 +00:00
bgpd: check flags before attempting keepalive ops
If a peer already has keepalives turned on when asking to turn them on, return immediately. Same thing for turning them off. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
cadc5f3377
commit
096476ddb0
@ -224,6 +224,9 @@ void *bgp_keepalives_start(void *arg)
|
||||
|
||||
void bgp_keepalives_on(struct peer *peer)
|
||||
{
|
||||
if (CHECK_FLAG(peer->thread_flags, PEER_THREAD_KEEPALIVES_ON))
|
||||
return;
|
||||
|
||||
struct frr_pthread *fpt = frr_pthread_get(PTHREAD_KEEPALIVES);
|
||||
assert(fpt->running);
|
||||
|
||||
@ -251,6 +254,9 @@ void bgp_keepalives_on(struct peer *peer)
|
||||
|
||||
void bgp_keepalives_off(struct peer *peer)
|
||||
{
|
||||
if (!CHECK_FLAG(peer->thread_flags, PEER_THREAD_KEEPALIVES_ON))
|
||||
return;
|
||||
|
||||
struct frr_pthread *fpt = frr_pthread_get(PTHREAD_KEEPALIVES);
|
||||
assert(fpt->running);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user