summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2020-06-07 09:18:26 -0400
committerDave Barach <dave@barachs.net>2020-06-07 09:18:57 -0400
commitc1f0d9c105c25c67d9ef86a53c10d43d40b61fe0 (patch)
treeec215a304bcd8759d20f7f58a9e807a17b022204 /src/plugins
parent26d890eb4b1ab19fea4d2d02bfc6dc89d2c1b771 (diff)
mactime: print error if feature not enabled
Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I8fbc4baefecf512573126c5085ed7a6e2e360fbe
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/mactime/mactime.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/mactime/mactime.c b/src/plugins/mactime/mactime.c
index 2add0e61b0e..d41853447c1 100644
--- a/src/plugins/mactime/mactime.c
+++ b/src/plugins/mactime/mactime.c
@@ -554,6 +554,11 @@ show_mactime_command_fn (vlib_main_t * vm,
vlib_counter_t allow, drop;
ip_neighbor_t *ipn;
+ if (mm->feature_initialized == 0)
+ return clib_error_return
+ (0,
+ "Feature not initialized, suggest 'help mactime enable-disable'...");
+
vec_reset_length (mm->arp_cache_copy);
/* Walk all ip4 neighbours on all interfaces */
ip_neighbor_walk (IP46_TYPE_IP4, ~0, mactime_ip_neighbor_copy, mm);
@@ -704,7 +709,9 @@ clear_mactime_command_fn (vlib_main_t * vm,
mactime_main_t *mm = &mactime_main;
if (mm->feature_initialized == 0)
- return clib_error_return (0, "feature not enabled");
+ return clib_error_return
+ (0,
+ "Feature not initialized, suggest 'help mactime enable-disable'...");
vlib_clear_combined_counters (&mm->allow_counters);
vlib_clear_combined_counters (&mm->drop_counters);