Advance the xid before we send each DHCPDISCOVER.

This commit is contained in:
Nicholas J. Kain 2022-08-28 04:06:15 -04:00
parent c755902fbc
commit 9b8e2facbf
No known key found for this signature in database

1
dhcp.c
View File

@ -413,6 +413,7 @@ static void init_packet(struct dhcpmsg *packet, uint8_t type)
ssize_t send_discover(struct client_state_t *cs)
{
cs->xid = nk_random_u32(&cs->rnd_state);
struct dhcpmsg packet = {.xid = cs->xid};
init_packet(&packet, DHCPDISCOVER);
if (cs->clientAddr)