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:
1 parent
0e5b94d038
commit
7b660944b6
5 files changed
+10
-5
No files matched your search
@@ -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