mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
sd-dhcp-client: anonymize DHCPDISCOVER (fixes #13992)
According to RFC7844 section 3 the DHCPDISCOVER message should not contain option 50 («Requested IP Address») when Anonymize is true
This commit is contained in:
parent
a0fa3ef7ff
commit
bf9012bbf6
@ -875,7 +875,9 @@ static int client_send_discover(sd_dhcp_client *client) {
|
||||
address be assigned, and may include the ’IP address lease time’
|
||||
option to suggest the lease time it would like.
|
||||
*/
|
||||
if (client->last_addr != INADDR_ANY) {
|
||||
/* RFC7844 section 3:
|
||||
SHOULD NOT contain any other option. */
|
||||
if (!client->anonymize && client->last_addr != INADDR_ANY) {
|
||||
r = dhcp_option_append(&discover->dhcp, optlen, &optoffset, 0,
|
||||
SD_DHCP_OPTION_REQUESTED_IP_ADDRESS,
|
||||
4, &client->last_addr);
|
||||
|
Loading…
Reference in New Issue
Block a user