mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-05 00:00:45 -04:00
dhcp: Ignore DHCP OFFER messages without assigned address
FreeRADIUS seems to respond that way if it can't allocate an address to the client.
This commit is contained in:
parent
6e9cfe9751
commit
ce381883a1
@ -489,6 +489,16 @@ static void handle_offer(private_dhcp_socket_t *this, dhcp_t *dhcp, int optlen)
|
||||
offer = host_create_from_chunk(AF_INET,
|
||||
chunk_from_thing(dhcp->your_address), 0);
|
||||
|
||||
if (offer->is_anyaddr(offer))
|
||||
{
|
||||
server = host_create_from_chunk(AF_INET,
|
||||
chunk_from_thing(dhcp->server_address), 0);
|
||||
DBG1(DBG_CFG, "ignoring DHCP OFFER %+H from %H", offer, server);
|
||||
server->destroy(server);
|
||||
offer->destroy(offer);
|
||||
return;
|
||||
}
|
||||
|
||||
this->mutex->lock(this->mutex);
|
||||
enumerator = this->discover->create_enumerator(this->discover);
|
||||
while (enumerator->enumerate(enumerator, &transaction))
|
||||
|
Loading…
x
Reference in New Issue
Block a user