From: Quentin Young Date: Wed, 21 Feb 2018 17:01:34 +0000 (-0500) Subject: bgpd: fix incorrect keepalive timer evaluation X-Git-Tag: frr-4.0~9^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=b576c464ea1fa53f574efc9516a0f87343d48ee7;p=matthieu%2Ffrr.git bgpd: fix incorrect keepalive timer evaluation Incorrect check for sentinel value effectively caused peers to sometimes use the keepalive timer value of other peers, which sometimes led to hold timer expiry. Signed-off-by: Quentin Young --- diff --git a/bgpd/bgp_keepalives.c b/bgpd/bgp_keepalives.c index 5a48c7013e..1504893c47 100644 --- a/bgpd/bgp_keepalives.c +++ b/bgpd/bgp_keepalives.c @@ -119,7 +119,7 @@ static void peer_process(struct hash_backet *hb, void *arg) } /* if calculated next update for this peer < current delay, use it */ - if (next_update->tv_sec <= 0 || timercmp(&diff, next_update, <)) + if (next_update->tv_sec < 0 || timercmp(&diff, next_update, <)) *next_update = diff; }