selecting_packet() shouldn't take the xid from the packet.

This change actually has no effect because incoming dhcp packets
that differ from our xid are dropped, so the xid is always changed
to the same value that it already has.
This commit is contained in:
Nicholas J. Kain 2015-02-18 06:01:43 -05:00
parent da7d34a300
commit f28495a58b

View File

@ -276,6 +276,9 @@ static int an_packet(struct client_state_t cs[static 1],
return ANP_IGNORE;
}
// XXX: This should also handle the REQUESTING part of an_packet and
// be used during REQUESTING; that will allow ndhc to track multiple
// DHCPOFFERs.
static int selecting_packet(struct client_state_t cs[static 1],
struct dhcpmsg packet[static 1], uint8_t msgtype,
uint32_t srcaddr)
@ -292,7 +295,6 @@ static int selecting_packet(struct client_state_t cs[static 1],
char svrbuf[INET_ADDRSTRLEN];
char srcbuf[INET_ADDRSTRLEN];
cs->serverAddr = sid;
cs->xid = packet->xid;
cs->clientAddr = packet->yiaddr;
cs->srcAddr = srcaddr;
cs->dhcp_wake_ts = curms();