diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-07-14 10:29:40 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-07-14 22:08:29 +0900 |
commit | 150d3b8ea748f45e80b1bd4f5f1ae1554fc5e7fa (patch) | |
tree | b4885ccae13f927307da39ea22089c2cd3ae6c53 /src/network/networkd-dhcp4.c | |
parent | b9adb191a1bf2c7f891ca7c029ae2d2722b5aa5a (diff) | |
download | systemd-150d3b8ea748f45e80b1bd4f5f1ae1554fc5e7fa.tar.gz systemd-150d3b8ea748f45e80b1bd4f5f1ae1554fc5e7fa.tar.bz2 systemd-150d3b8ea748f45e80b1bd4f5f1ae1554fc5e7fa.zip |
network:dhcp4: request domain search list if UseDomains=yes
Closes #8174.
Diffstat (limited to 'src/network/networkd-dhcp4.c')
-rw-r--r-- | src/network/networkd-dhcp4.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c index 7ed91cebd1..5ada9f0d01 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -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) |