summaryrefslogtreecommitdiff
path: root/bgpd/bgp_keepalives.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@qlyoung.net>2018-02-21 12:01:34 -0500
committerQuentin Young <qlyoung@qlyoung.net>2018-02-21 12:15:17 -0500
commit2ccf91b10848bed00f3424ac276f8549609791d4 (patch)
treecc24f24bef9f4b9f1939993db520b8f457c114c1 /bgpd/bgp_keepalives.c
parent4298f5e937a1fa689047697395f8b741fb9b3d15 (diff)
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 <qlyoung@qlyoung.net>
Diffstat (limited to 'bgpd/bgp_keepalives.c')
-rw-r--r--bgpd/bgp_keepalives.c2
1 files changed, 1 insertions, 1 deletions
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;
}