Fix DHCP client crash with worker threads 52/10752/1
authorMatthew Smith <[email protected]>
Sat, 10 Feb 2018 17:11:45 +0000 (11:11 -0600)
committerNeale Ranns <[email protected]>
Thu, 22 Feb 2018 12:36:00 +0000 (04:36 -0800)
commitfdb47ad887957cf677de39c31a7e9d8656ce61fb
tree632a4d1c4baad2a76405370e1a2aee5f72de6ee4
parentb704f49bb6ce1f816b86ae0e8930b4652d2860d2
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 <[email protected]>
src/vnet/dhcp/client.c
src/vnet/dhcp/dhcp4_proxy_node.c
src/vnet/dhcp/dhcp6_proxy_node.c