summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Marineau <michael.marineau@coreos.com>2015-03-13 12:01:29 -0700
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-03-15 17:26:58 -0400
commit301f4073fe1c2757e602aef24cee9ccf5f81a3a3 (patch)
tree2689fff4ad62c6a0b0716e6c68ad62ea8da50248
parente62d9b81926e22f7a1d8a117fd85bb735d3cead2 (diff)
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.
-rw-r--r--man/systemd.network.xml8
-rw-r--r--src/network/networkd-network-gperf.gperf1
2 files changed, 9 insertions, 0 deletions
diff --git a/man/systemd.network.xml b/man/systemd.network.xml
index ed0b2eb4a4..087e9e2156 100644
--- a/man/systemd.network.xml
+++ b/man/systemd.network.xml
@@ -515,6 +515,14 @@
</listitem>
</varlistentry>
<varlistentry>
+ <term><varname>UseNTP=</varname></term>
+ <listitem>
+ <para>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.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term><varname>UseMTU=</varname></term>
<listitem>
<para>When true, the interface maximum transmission unit
diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf
index 93df83af08..8abf5bcf2e 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)