dhcp: Only send client identifier if identity_lease is enabled
The client identifier serves as unique identifier just like a unique MAC address would, so even with identity_leases disabled some DHCP servers might assign unique leases per identity.
This commit is contained in:
@@ -268,7 +268,8 @@ static int prepare_dhcp(private_dhcp_socket_t *this,
|
||||
remaining -= sizeof(dhcp_option_t) + option->len;
|
||||
}
|
||||
|
||||
if (remaining >= sizeof(dhcp_option_t) + 2)
|
||||
if (this->identity_lease &&
|
||||
remaining >= sizeof(dhcp_option_t) + 2)
|
||||
{
|
||||
option = (dhcp_option_t*)&dhcp->options[optlen];
|
||||
option->type = DHCP_CLIENT_ID;
|
||||
|
||||
Reference in New Issue
Block a user