From: Michael Marineau Date: Fri, 13 Mar 2015 19:01:29 +0000 (-0700) Subject: network: add UseNTP DHCP option X-Git-Tag: v219.0~290 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=301f4073fe1c2757e602aef24cee9ccf5f81a3a3 network: add UseNTP DHCP option Despite having the internal logic in place to enable/disable using NTP servers provided by DHCP the network config didn't expose the option. --- diff --git a/man/systemd.network.xml b/man/systemd.network.xml index ed0b2eb4a..087e9e215 100644 --- a/man/systemd.network.xml +++ b/man/systemd.network.xml @@ -514,6 +514,14 @@ any statically configured ones. + + UseNTP= + + When true (the default), the NTP servers received + from the DHCP server will be used by systemd-timesyncd + and take precedence over any statically configured ones. + + UseMTU= diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf index 93df83af0..8abf5bcf2 100644 --- a/src/network/networkd-network-gperf.gperf +++ b/src/network/networkd-network-gperf.gperf @@ -60,6 +60,7 @@ Route.Metric, config_parse_route_priority, 0, Route.Scope, config_parse_route_scope, 0, 0 DHCP.ClientIdentifier, config_parse_dhcp_client_identifier,0, offsetof(Network, dhcp_client_identifier) DHCP.UseDNS, config_parse_bool, 0, offsetof(Network, dhcp_dns) +DHCP.UseNTP, config_parse_bool, 0, offsetof(Network, dhcp_ntp) DHCP.UseMTU, config_parse_bool, 0, offsetof(Network, dhcp_mtu) DHCP.UseHostname, config_parse_bool, 0, offsetof(Network, dhcp_hostname) DHCP.UseDomains, config_parse_bool, 0, offsetof(Network, dhcp_domains)