xid should be regenerated whenever we start a new discover cycle.

Somewhere along the line it quit being set at the start of discovery
and was always 0.  This is clearly not desired behavior.

Found by manual examination of packets while fuzzing the options
parser.
This commit is contained in:
Nicholas J. Kain 2015-02-20 03:48:13 -05:00
parent b8df1b33f5
commit 646931a2bf

View File

@ -439,6 +439,7 @@ int dhcp_handle(struct client_state_t cs[static 1], long long nowts,
{
scrBegin;
reinit:
cs->xid = nk_random_u32(&cs->rnd32_state);
// We're in the SELECTING state here.
for (;;) {
int ret = COR_SUCCESS;