From fdb47ad887957cf677de39c31a7e9d8656ce61fb Mon Sep 17 00:00:00 2001 From: Matthew Smith Date: Sat, 10 Feb 2018 11:11:45 -0600 Subject: Fix DHCP client crash with worker threads Crash occurring With a worker thread configured and dhcp client active on an interface. When a DHCP reply packet is received, call to ethernet_get_main() from dhcp_proxy_to_client_input() was causing a crash. Replaced with a call to vnet_get_ethernet_main(). Once that was resolved, calling dhcp_client_acquire_address() from a worker thread also caused a crash. Changed so the main thread will do the address/route configuration. Change-Id: Ib23984787102dea8cf6cfcde86188a751f15c1e1 Signed-off-by: Matthew Smith --- src/vnet/dhcp/dhcp6_proxy_node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vnet/dhcp/dhcp6_proxy_node.c') diff --git a/src/vnet/dhcp/dhcp6_proxy_node.c b/src/vnet/dhcp/dhcp6_proxy_node.c index 5a3a99e2e5d..2a1ac12e535 100644 --- a/src/vnet/dhcp/dhcp6_proxy_node.c +++ b/src/vnet/dhcp/dhcp6_proxy_node.c @@ -563,7 +563,7 @@ dhcpv6_proxy_to_client_input (vlib_main_t * vm, { u32 n_left_from, *from; - ethernet_main_t *em = ethernet_get_main (vm); + ethernet_main_t *em = vnet_get_ethernet_main (); dhcp_proxy_main_t *dm = &dhcp_proxy_main; dhcp_proxy_t *proxy; dhcp_server_t *server; -- cgit 1.2.3-korg