dhcp: fix unicast pkts, clean up state machine

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 <dave@barachs.net>
Change-Id: I3d10cd4c353298ed0b19e7e30887dc1d8d07b19e
This commit is contained in:
Dave Barach
2020-04-09 18:34:29 -04:00
committed by Florin Coras
parent 111666766d
commit c54162981c
2 changed files with 42 additions and 49 deletions
+3 -2
View File
@@ -108,8 +108,6 @@ typedef struct dhcp_client_t_
u8 client_hardware_address[6];
u8 client_detect_feature_enabled;
/* the unicast adjacency for the DHCP server */
adj_index_t ai_ucast;
/* the broadcast adjacency on the link */
adj_index_t ai_bcast;
/* IP DSCP to set in sent packets */
@@ -125,6 +123,9 @@ typedef struct
uword *client_by_sw_if_index;
u32 seed;
/* ip4-lookup node index */
u32 ip4_lookup_node_index;
/* convenience */
vlib_main_t *vlib_main;
vnet_main_t *vnet_main;