diff options
Diffstat (limited to 'src/plugins/lacp/lacp.c')
-rw-r--r-- | src/plugins/lacp/lacp.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/plugins/lacp/lacp.c b/src/plugins/lacp/lacp.c index 1a588376d9a..4bb50aea32a 100644 --- a/src/plugins/lacp/lacp.c +++ b/src/plugins/lacp/lacp.c @@ -180,6 +180,7 @@ lacp_interface_enable_disable (vlib_main_t * vm, bond_if_t * bif, if (enable) { + lacp_create_periodic_process (); port_number = clib_bitmap_first_clear (bif->port_number_bitmap); bif->port_number_bitmap = clib_bitmap_set (bif->port_number_bitmap, port_number, 1); @@ -195,11 +196,23 @@ lacp_interface_enable_disable (vlib_main_t * vm, bond_if_t * bif, } else { - lm->lacp_int--; + ASSERT (lm->lacp_int >= 1); if (lm->lacp_int == 0) { - vlib_process_signal_event (vm, lm->lacp_process_node_index, - LACP_PROCESS_EVENT_STOP, 0); + /* *INDENT-OFF* */ + ELOG_TYPE_DECLARE (e) = + { + .format = "lacp-int-en-dis: BUG lacp_int == 0", + }; + /* *INDENT-ON* */ + ELOG_DATA (&vlib_global_main.elog_main, e); + } + else + { + lm->lacp_int--; + if (lm->lacp_int == 0) + vlib_process_signal_event (vm, lm->lacp_process_node_index, + LACP_PROCESS_EVENT_STOP, 0); } } } |