From baa40641e263d6462426f87d329591eef4c4e340 Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Sun, 27 Sep 2020 10:22:43 -0400 Subject: cnat: fix session scanner restart point Restart point saved by caller, do not restart at i=0. Type: fix Signed-off-by: Dave Barach Change-Id: I36b7570085c4cbe84cea24339ae579e1fc906af8 --- src/plugins/cnat/cnat_session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/cnat') diff --git a/src/plugins/cnat/cnat_session.c b/src/plugins/cnat/cnat_session.c index a80e367c2cc..54554cedc8c 100644 --- a/src/plugins/cnat/cnat_session.c +++ b/src/plugins/cnat/cnat_session.c @@ -165,7 +165,7 @@ cnat_session_scan (vlib_main_t * vm, f64 start_time, int i) if (alloc_arena (h) == 0) return 0.0; - for (i = 0; i < h->nbuckets; i++) + for ( /* caller saves starting point */ ; i < h->nbuckets; i++) { /* allow no more than 100us without a pause */ if ((vlib_time_now (vm) - start_time) > 10e-5) -- cgit 1.2.3-korg