]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: change "Gateway=dhcp" to "Gateway=_dhcp" (#14774)
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 5 Feb 2020 04:41:30 +0000 (05:41 +0100)
committerGitHub <noreply@github.com>
Wed, 5 Feb 2020 04:41:30 +0000 (13:41 +0900)
This way we avoid confusion with a DNS name. Fixes #14773.

NEWS
man/systemd.network.xml
src/network/networkd-route.c
test/test-network/conf/dhcp-client-gateway-ipv4.network
test/test-network/conf/dhcp-client-gateway-ipv6.network

diff --git a/NEWS b/NEWS
index 2724cbaf0650f5e4925a562508bc8baaf2ea0641..181835a246d3e04c3fdbdf29ffcd21dcc7309ac0 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -148,8 +148,8 @@ CHANGES WITH 245 in spe:
           with it's sense inverted.
 
         * The Gateway= setting of [Route] sections of .network files gained
-          support for a special new value "dhcp". If set the configured static
-          route uses the gateway host configured via DHCP.
+          support for a special new value "_dhcp". If set, the configured
+          static route uses the gateway host configured via DHCP.
 
         * A new User= setting has been implemented for the [RoutingPolicyRule]
           section of .network files for configuring source routing based on UID
index 1861def7da6b080684bb3bc773cdbf306994dc9b..9e0bf69a358fa5500b7fd3bdea5e1079dfba646e 100644 (file)
         <varlistentry>
           <term><varname>Gateway=</varname></term>
           <listitem>
-            <para>Takes the gateway address or special value <literal>dhcp</literal>. If
-            <literal>dhcp</literal>, then the gateway address provided by DHCP (or in the IPv6 case,
+            <para>Takes the gateway address or special value <literal>_dhcp</literal>. If
+            <literal>_dhcp</literal>, then the gateway address provided by DHCP (or in the IPv6 case,
             provided by IPv6 RA) is used.</para>
           </listitem>
         </varlistentry>
index 2df8b864e881e8da1c8b92bd4d407abf9a387b13..e924723e5d903d6ca05a1de6f13942858656df8b 100644 (file)
@@ -1006,7 +1006,7 @@ int config_parse_gateway(
                 if (r < 0)
                         return r;
 
-                if (streq(rvalue, "dhcp")) {
+                if (streq(rvalue, "_dhcp")) {
                         n->gateway_from_dhcp = true;
                         TAKE_PTR(n);
                         return 0;
index 1b8a3751a438214983584e19e4e7258d34f0f138..7e6f6b33e01e929e44b60c9c86914ca9d25202cc 100644 (file)
@@ -6,5 +6,5 @@ DHCP=ipv4
 IPv6AcceptRA=no
 
 [Route]
-Gateway=dhcp
+Gateway=_dhcp
 Destination=10.0.0.0/8
index 058cb33080a84a7328c76bda507c380757dd3127..ce708e7da9a609663717f68f734650780d9fd1b2 100644 (file)
@@ -5,5 +5,5 @@ Name=veth99
 DHCP=ipv6
 
 [Route]
-Gateway=dhcp
+Gateway=_dhcp
 Destination=2001:1234:5:9fff:ff:ff:ff:ff/128