1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

networkd: send dhcp option NTP when UseNTP is true (#6726)

This commit is contained in:
juga0 2017-09-05 10:26:32 +00:00 committed by Lennart Poettering
parent 6dfcea32f4
commit ead36ce651

View File

@ -635,10 +635,11 @@ int dhcp4_configure(Link *link) {
return r;
}
/* Always acquire the timezone and NTP */
r = sd_dhcp_client_set_request_option(link->dhcp_client, SD_DHCP_OPTION_NTP_SERVER);
if (r < 0)
return r;
if (link->network->dhcp_use_ntp) {
r = sd_dhcp_client_set_request_option(link->dhcp_client, SD_DHCP_OPTION_NTP_SERVER);
if (r < 0)
return r;
}
r = sd_dhcp_client_set_request_option(link->dhcp_client, SD_DHCP_OPTION_NEW_TZDB_TIMEZONE);
if (r < 0)