diff options
Diffstat (limited to 'src/plugins/dhcp/client.c')
-rw-r--r-- | src/plugins/dhcp/client.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/dhcp/client.c b/src/plugins/dhcp/client.c index e15b6cb69f8..e79cb694378 100644 --- a/src/plugins/dhcp/client.c +++ b/src/plugins/dhcp/client.c @@ -246,6 +246,7 @@ dhcp_client_addr_callback (u32 * cindex) static void dhcp_client_reset (dhcp_client_main_t * dcm, dhcp_client_t * c) { + vlib_worker_thread_barrier_sync (dcm->vlib_main); if (c->client_detect_feature_enabled == 1) { vnet_feature_enable_disable ("ip4-unicast", @@ -253,8 +254,9 @@ dhcp_client_reset (dhcp_client_main_t * dcm, dhcp_client_t * c) c->sw_if_index, 0, 0, 0); c->client_detect_feature_enabled = 0; } - dhcp_client_release_address (dcm, c); + vlib_worker_thread_barrier_release (dcm->vlib_main); + clib_memset (&c->learned, 0, sizeof (c->installed)); c->state = DHCP_DISCOVER; c->next_transmit = vlib_time_now (dcm->vlib_main); @@ -704,9 +706,11 @@ dhcp_discover_state (dhcp_client_main_t * dcm, dhcp_client_t * c, f64 now) */ if (c->client_detect_feature_enabled == 0) { + vlib_worker_thread_barrier_sync (dcm->vlib_main); vnet_feature_enable_disable ("ip4-unicast", "ip4-dhcp-client-detect", c->sw_if_index, 1 /* enable */ , 0, 0); + vlib_worker_thread_barrier_release (dcm->vlib_main); c->client_detect_feature_enabled = 1; } @@ -754,9 +758,11 @@ dhcp_bound_state (dhcp_client_main_t * dcm, dhcp_client_t * c, f64 now) */ if (c->client_detect_feature_enabled == 0) { + vlib_worker_thread_barrier_sync (dcm->vlib_main); vnet_feature_enable_disable ("ip4-unicast", "ip4-dhcp-client-detect", c->sw_if_index, 1 /* enable */ , 0, 0); + vlib_worker_thread_barrier_release (dcm->vlib_main); c->client_detect_feature_enabled = 1; } |