From 4b7b5abb785c03cb880e3a8a7a724d7de6e9cf3b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 27 Aug 2015 01:14:20 +0200 Subject: dhcp: NTP servers should be requested by networkd but not implicitly by sd-dhcp The library so far always requested the NTP servers. This might be unnecessary in some uses, hence let's move the request into networkd instead. --- src/network/networkd-dhcp4.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/network/networkd-dhcp4.c') diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c index 7fce389fa2..ea1b18a0e5 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -624,7 +624,11 @@ int dhcp4_configure(Link *link) { return r; } - /* Always acquire the timezone */ + /* Always acquire the timezone and NTP*/ + r = sd_dhcp_client_set_request_option(link->dhcp_client, DHCP_OPTION_NTP_SERVER); + if (r < 0) + return r; + r = sd_dhcp_client_set_request_option(link->dhcp_client, DHCP_OPTION_NEW_TZDB_TIMEZONE); if (r < 0) return r; -- cgit v1.2.3-54-g00ecf