summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2020-04-08 08:45:27 -0400
committerFlorin Coras <florin.coras@gmail.com>2020-04-09 14:31:16 +0000
commitca578521686790ce1f3b1a8bc43a182fd4949a36 (patch)
treea6d7b5ef696d37b65fdb710a8e08a59b24c291fa
parent7a90e500ba431575bf6771f88ad43380f9483061 (diff)
bfd: always start timers with non-zero tick counts
Otherwise the tw_timer_template code ASSERTs... Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I85e00a3e3486e3b238254ac4116d684a32984434
-rw-r--r--src/vnet/bfd/bfd_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vnet/bfd/bfd_main.c b/src/vnet/bfd/bfd_main.c
index 3570ae03291..4b8975732af 100644
--- a/src/vnet/bfd/bfd_main.c
+++ b/src/vnet/bfd/bfd_main.c
@@ -332,6 +332,7 @@ bfd_set_timer (bfd_main_t * bm, bfd_session_t * bs, u64 now,
"wheel_time_ticks %u", bs->event_time_nsec,
bs->event_time_nsec - now,
(bs->event_time_nsec - now) * SEC_PER_NSEC, wheel_time_ticks);
+ wheel_time_ticks = wheel_time_ticks ? wheel_time_ticks : 1;
bfd_lock (bm);
if (bs->tw_id)
{