1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-08-29 01:50:15 +03:00

network:dhcp4: request domain search list if UseDomains=yes

Closes #8174.
This commit is contained in:
Yu Watanabe
2019-07-14 10:29:40 +09:00
parent b9adb191a1
commit 150d3b8ea7

View File

@ -1041,6 +1041,12 @@ int dhcp4_configure(Link *link) {
return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for classless static route: %m");
}
if (link->network->dhcp_use_domains != DHCP_USE_DOMAINS_NO && !link->network->dhcp_anonymize) {
r = sd_dhcp_client_set_request_option(link->dhcp_client, SD_DHCP_OPTION_DOMAIN_SEARCH_LIST);
if (r < 0)
return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for domain search list: %m");
}
if (link->network->dhcp_use_ntp) {
r = sd_dhcp_client_set_request_option(link->dhcp_client, SD_DHCP_OPTION_NTP_SERVER);
if (r < 0)