]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: fix oopsie with SendHoldTime==0 11232/head
authorDavid Lamparter <equinox@opensourcerouting.org>
Fri, 20 May 2022 12:16:24 +0000 (14:16 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Fri, 20 May 2022 12:16:24 +0000 (14:16 +0200)
... *duh*

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
bgpd/bgp_packet.c

index e4697fdb2bd45cb94f49f112af4d7ca18b47310b..c8996ba634e0a1ee26a24d0bd38ebd8ad24132cb 100644 (file)
@@ -147,7 +147,9 @@ static void bgp_packet_add(struct peer *peer, struct stream *s)
                 * timer that ticks down SendHoldTime, as we'll be here sooner
                 * or later anyway and will see the checks below failing.
                 */
-               if (delta > 2 * (intmax_t)holdtime) {
+               if (!holdtime) {
+                       /* no holdtime, do nothing. */
+               } else if (delta > 2 * (intmax_t)holdtime) {
                        flog_err(
                                EC_BGP_SENDQ_STUCK_PROPER,
                                "%s has not made any SendQ progress for 2 holdtimes, terminating session",