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>
This commit is contained in:
Quentin Young 2018-02-21 12:01:34 -05:00
parent 4298f5e937
commit 2ccf91b108
No known key found for this signature in database
GPG Key ID: DAF48E0F57E0834F

View File

@ -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;
}