chiark / gitweb /
network: add UseNTP DHCP option
authorMichael Marineau <michael.marineau@coreos.com>
Fri, 13 Mar 2015 19:01:29 +0000 (12:01 -0700)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 15 Mar 2015 21:26:58 +0000 (17:26 -0400)
Despite having the internal logic in place to enable/disable using NTP
servers provided by DHCP the network config didn't expose the option.

man/systemd.network.xml
src/network/networkd-network-gperf.gperf

index ed0b2eb4a47a81c776c21d3a96c129529cdc6410..087e9e2156324f2baec2ae225f4daf4efba335ce 100644 (file)
             any statically configured ones.</para>
           </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>
index 93df83af08f96dd0bfa3478cbfa8d084890c68a3..8abf5bcf2e8097cb3ca58602049ce08c4ba32ed9 100644 (file)
@@ -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)