summaryrefslogtreecommitdiff
path: root/bgpd
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2022-05-20 14:16:24 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2022-05-20 14:16:24 +0200
commit382268f46a01e38851b2b3abd3d67b6890822d65 (patch)
tree1d104ead4f871948768457ab865712b36a057aea /bgpd
parentd37879b7a25fc3c0323d88c666b6a7646860a9c3 (diff)
bgpd: fix oopsie with SendHoldTime==0
... *duh* Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_packet.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index e4697fdb2b..c8996ba634 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -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",