aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorSwarup Nayak <swarupnpvt@gmail.com>2017-12-11 20:08:57 +0530
committerSwarup Nayak <swarupnpvt@gmail.com>2017-12-11 20:10:26 +0530
commitabbc04c564b4120a3ee753cdd133a7a151dc5c8e (patch)
tree6751afe90f9555ed5ccdcb5bb09f4e838b6b9fb3 /src/vnet
parent1b0c983726d4a6abe5b86b1cfad1d3280285748f (diff)
ONE-33 "one statistics flush" throws assert when one counter not added
Change-Id: Id10f10889c3036a6db21c999c1e6c54fc1770213 Signed-off-by: Swarup Nayak <swarupnpvt@gmail.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c b/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
index ca1e320700e..f810ae5fec4 100644
--- a/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
+++ b/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
@@ -1289,6 +1289,9 @@ vnet_lisp_flush_stats (void)
vlib_combined_counter_main_t *cm = &lgm->counters;
u32 i;
+ if (cm->counters == NULL)
+ return 0;
+
for (i = 0; i < vlib_combined_counter_n_counters (cm); i++)
vlib_zero_combined_counter (cm, i);