mirror of
https://github.com/xcat2/xNBA.git
synced 2024-11-22 09:31:51 +00:00
[dhcp] Don't consider invalid offers to be duplicates
This fixes a regression in BOOTP support; since BOOTP requests often have the `siaddr' field set to 0.0.0.0, they would be considered duplicates of the first zeroed-out offer slot. Signed-off-by: Joshua Oreman <oremanj@rwcr.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
parent
2aad3fab23
commit
905ea56753
@ -417,13 +417,13 @@ static void dhcp_rx_offer ( struct dhcp_session *dhcp,
|
||||
|
||||
/* Enqueue an offer to be filled in */
|
||||
for ( i = 0 ; i < DHCP_MAX_OFFERS ; i++ ) {
|
||||
if ( ! dhcp->offers[i].valid )
|
||||
break;
|
||||
|
||||
if ( dhcp->offers[i].server.s_addr == server_id.s_addr ) {
|
||||
DBGC ( dhcp, " dup\n" );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! dhcp->offers[i].valid )
|
||||
break;
|
||||
}
|
||||
if ( i == DHCP_MAX_OFFERS ) {
|
||||
DBGC ( dhcp, " dropped\n" );
|
||||
|
Loading…
Reference in New Issue
Block a user