network: change "Gateway=dhcp" to "Gateway=_dhcp" (#14774)

This way we avoid confusion with a DNS name. Fixes #14773.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2020-02-05 05:41:30 +01:00 committed by GitHub
parent f2f1b52c6f
commit 427928caa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

4
NEWS
View File

@ -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

View File

@ -1135,8 +1135,8 @@
<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>

View 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;

View File

@ -6,5 +6,5 @@ DHCP=ipv4
IPv6AcceptRA=no
[Route]
Gateway=dhcp
Gateway=_dhcp
Destination=10.0.0.0/8

View File

@ -5,5 +5,5 @@ Name=veth99
DHCP=ipv6
[Route]
Gateway=dhcp
Gateway=_dhcp
Destination=2001:1234:5:9fff:ff:ff:ff:ff/128