aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cdp/cdp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cdp/cdp.c')
-rw-r--r--src/plugins/cdp/cdp.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/plugins/cdp/cdp.c b/src/plugins/cdp/cdp.c
index 45863a096a3..2c947a74d71 100644
--- a/src/plugins/cdp/cdp.c
+++ b/src/plugins/cdp/cdp.c
@@ -63,11 +63,17 @@ cdp_enable_disable (cdp_main_t * cm, int enable_disable)
int rv = 0;
if (enable_disable)
- vlib_process_signal_event (cm->vlib_main, cdp_process_node.index,
- CDP_EVENT_ENABLE, 0);
+ {
+ vnet_cdp_create_periodic_process (cm);
+ vlib_process_signal_event (cm->vlib_main, cm->cdp_process_node_index,
+ CDP_EVENT_ENABLE, 0);
+ }
else
- vlib_process_signal_event (cm->vlib_main, cdp_process_node.index,
- CDP_EVENT_DISABLE, 0);
+ {
+ vnet_cdp_create_periodic_process (cm);
+ vlib_process_signal_event (cm->vlib_main, cm->cdp_process_node_index,
+ CDP_EVENT_DISABLE, 0);
+ }
cm->enabled = enable_disable;
return rv;