dhcp: fix unicast pkts, clean up state machine 88/26488/1
authorDave Barach <[email protected]>
Mon, 13 Apr 2020 20:44:09 +0000 (16:44 -0400)
committerDave Barach <[email protected]>
Mon, 13 Apr 2020 20:44:42 +0000 (16:44 -0400)
commitfd0834262c517ea3a420fdba05fb95bc4141762b
treed4c5b72fd2734cc81120c7f4a1f6b98f9f06560e
parent5e62c84bb7058b58d9f0fa3b5eff9af93c073274
dhcp: fix unicast pkts, clean up state machine

Nominally a bug-fix cherry-pick, but completely manual. Closer to a
full feature backport minus binary api changes.

Send dhcp unicast packets to ip4-lookup. Otherwise, these packets
won't reach a dhcp server on a different subnet.

Do an immediate client scan after processing wakeup events.

Calculate the next process wakeup time by scanning all
clients.

Increase maximum (idle, no-clients-configured) timeout to 1000
seconds.

Reduce log spew.

Type: fix

Signed-off-by: Dave Barach <[email protected]>
Change-Id: I3d10cd4c353298ed0b19e7e30887dc1d8d07b19e
(cherry picked from commit c54162981cdd41d65ed283df36955007552ddffe)
src/vlibmemory/api.h
src/vnet/CMakeLists.txt
src/vnet/dhcp/client.c
src/vnet/dhcp/client.h
src/vnet/dhcp/dhcp4_packet.c [new file with mode: 0644]
src/vnet/dhcp/dhcp4_packet.h
src/vnet/dhcp/dhcp_api.c
test/test_dhcp.py