summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2025-03-25 09:01:17 -0400
committerGitHub <noreply@github.com>2025-03-25 09:01:17 -0400
commit1248e0d4560d1048db2d66f0753b02099ee67130 (patch)
treeb152090b4738e14b825d39c3d70cd1af999c46ba
parent0805c2e27c3b07b5a957f3c9e5e76ab3f14efbf6 (diff)
parent78f024fa20b0a41ae02e1666d88121e332c50399 (diff)
Merge pull request #18489 from opensourcerouting/fix/backport_9a26a56c5188fd1c95e244932bc17f97b9051935_10.2
bgpd: Fix holdtime not working properly when busy
-rw-r--r--bgpd/bgp_fsm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index f5b0e48784..d2c45ca75c 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -524,9 +524,11 @@ static void bgp_holdtime_timer(struct event *thread)
*/
inq_count = atomic_load_explicit(&connection->ibuf->count,
memory_order_relaxed);
- if (inq_count)
+ if (inq_count) {
BGP_TIMER_ON(connection->t_holdtime, bgp_holdtime_timer,
peer->v_holdtime);
+ return;
+ }
EVENT_VAL(thread) = Hold_Timer_expired;
bgp_event(thread); /* bgp_event unlocks peer */