]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Fix holdtime not working properly when busy mergify/bp/stable/10.3/pr-18483 18485/head
authorDonald Sharp <sharpd@nvidia.com>
Mon, 24 Mar 2025 18:28:38 +0000 (14:28 -0400)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Tue, 25 Mar 2025 07:39:31 +0000 (07:39 +0000)
Commit:  cc9f21da2218d95567eff1501482ce58e6600f54

Modified the bgp_fsm code to dissallow the extension
of the hold time when the system is under extremely
heavy load.  This was a attempt to remove the return
code but it was too aggressive and messed up this bit
of code.

Put the behavior back that was introduced in:
d0874d195d0127009a7d9c06920c52c95319eff9

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 9a26a56c5188fd1c95e244932bc17f97b9051935)

bgpd/bgp_fsm.c

index c7a4c6928adf2ba9f788658d3340722159e936e4..24957204a48eca7edce857a7983edd5f8db3141b 100644 (file)
@@ -528,9 +528,11 @@ static void bgp_holdtime_timer(struct event *thread)
        frr_with_mutex (&connection->io_mtx) {
                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 */