summaryrefslogtreecommitdiffstats
path: root/src/vnet/dhcp/dhcp4_proxy_node.c
diff options
context:
space:
mode:
authorMatthew Smith <mgsmith@netgate.com>2018-02-10 11:11:45 -0600
committerDave Barach <openvpp@barachs.net>2018-02-12 19:34:17 +0000
commit7a1928342109cd05cccf9969e61b5fe8f00a18cf (patch)
treeb1b618b07d620fee5ba06ca4222d97668cfb8f10 /src/vnet/dhcp/dhcp4_proxy_node.c
parent18b631560b17d5fd143c87d77f86a371cb93e6d8 (diff)
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 <mgsmith@netgate.com>
Diffstat (limited to 'src/vnet/dhcp/dhcp4_proxy_node.c')
-rw-r--r--src/vnet/dhcp/dhcp4_proxy_node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/dhcp/dhcp4_proxy_node.c b/src/vnet/dhcp/dhcp4_proxy_node.c
index e84d72c0afb..6b15c51b38f 100644
--- a/src/vnet/dhcp/dhcp4_proxy_node.c
+++ b/src/vnet/dhcp/dhcp4_proxy_node.c
@@ -477,7 +477,7 @@ dhcp_proxy_to_client_input (vlib_main_t * vm,
vlib_frame_t * from_frame)
{
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 *dpm = &dhcp_proxy_main;
vnet_main_t *vnm = vnet_get_main ();
ip4_main_t *im = &ip4_main;