logger(LOG_DEBUG, "bogus cookie, ignoring");
continue;
}
+ /* Ensure it's the right transaction */
if (state->xid != dhcp->xid) {
logger(LOG_DEBUG,
"ignoring packet with xid 0x%x as"
dhcp->xid, state->xid);
continue;
}
+ /* Ensure packet is for us */
+ if (iface->hwlen <= sizeof(dhcp->chaddr) &&
+ memcmp(dhcp->chaddr, iface->hwaddr, iface->hwlen))
+ {
+ logger(LOG_DEBUG, "xid 0x%x is not for our hwaddr %s",
+ dhcp->xid,
+ hwaddr_ntoa(dhcp->chaddr, sizeof(dhcp->chaddr)));
+ continue;
+ }
/* We should ensure that the packet is terminated correctly
* if we have space for the terminator */
if ((size_t)bytes < sizeof(struct dhcp_message)) {