]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: rename UseFQDN= -> UseHostname=
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 17 Feb 2021 20:30:09 +0000 (05:30 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 18 Feb 2021 20:47:37 +0000 (21:47 +0100)
Prompted by
https://github.com/systemd/systemd/pull/18543#issuecomment-780798451.

man/systemd.network.xml
src/network/networkd-dhcp6.c
src/network/networkd-network-gperf.gperf
src/network/networkd-network.c
src/network/networkd-network.h
test/fuzz/fuzz-network-parser/directives.network

index dbf074b8d9279af7c108f75eea7ece208d83ab7e..d0bd0c57d45ba22e075b2a9dbf6bbebf6b15839b 100644 (file)
@@ -1935,18 +1935,12 @@ IPv6Token=prefixstable:2002:da8:1::</programlisting></para>
         <varlistentry>
           <term><varname>UseDNS=</varname></term>
           <term><varname>UseNTP=</varname></term>
+          <term><varname>UseHostname=</varname></term>
           <listitem>
             <para>As in the [DHCPv4] section.</para>
           </listitem>
         </varlistentry>
 
-        <varlistentry>
-          <term><varname>UseFQDN=</varname></term>
-          <listitem>
-            <para>Equivalent of <varname>UseHostname=</varname> in the [DHCPv4] section.</para>
-          </listitem>
-        </varlistentry>
-
         <varlistentry>
           <term><varname>RouteMetric=</varname></term>
           <listitem>
index b36efd811c4d2007875b3f8558ae7150083ff280..72bb46b18650a87549814cf8557769dfdbad60be 100644 (file)
@@ -1076,9 +1076,10 @@ static int dhcp6_address_acquired(Link *link) {
                         return r;
         }
 
-        if (link->network->dhcp6_use_fqdn) {
+        if (link->network->dhcp6_use_hostname) {
                 const char *dhcpname = NULL;
                 _cleanup_free_ char *hostname = NULL;
+
                 (void) sd_dhcp6_lease_get_fqdn(link->dhcp6_lease, &dhcpname);
 
                 if (dhcpname) {
index 348c27d4e1b44df284519ef074c68cd03be9dd1c..60ac30fbce6dcc8cb5d8df39fb15d0c72455e25a 100644 (file)
@@ -225,7 +225,7 @@ DHCPv4.RouteMTUBytes,                        config_parse_mtu,
 DHCPv4.FallbackLeaseLifetimeSec,             config_parse_dhcp_fallback_lease_lifetime,                0,                             0
 DHCPv6.UseAddress,                           config_parse_bool,                                        0,                             offsetof(Network, dhcp6_use_address)
 DHCPv6.UseDNS,                               config_parse_dhcp_use_dns,                                0,                             0
-DHCPv6.UseFQDN,                              config_parse_bool,                                        0,                             offsetof(Network, dhcp6_use_fqdn)
+DHCPv6.UseHostname,                          config_parse_bool,                                        0,                             offsetof(Network, dhcp6_use_hostname)
 DHCPv6.UseNTP,                               config_parse_dhcp_use_ntp,                                0,                             0
 DHCPv6.RapidCommit,                          config_parse_bool,                                        0,                             offsetof(Network, dhcp6_rapid_commit)
 DHCPv6.MUDURL,                               config_parse_dhcp6_mud_url,                               0,                             0
index 609170e1cae20b1540e6e488d52d1b8ec3596fdd..4f0dfe469f04f50d91c965d6b4a7a361f2ca01eb 100644 (file)
@@ -373,7 +373,7 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi
 
                 .dhcp6_use_address = true,
                 .dhcp6_use_dns = true,
-                .dhcp6_use_fqdn = true,
+                .dhcp6_use_hostname = true,
                 .dhcp6_use_ntp = true,
                 .dhcp6_rapid_commit = true,
                 .dhcp6_route_metric = DHCP_ROUTE_METRIC,
index fc3d5a8a7f9aa9ea8839e3ef9422703cb59fdeee..48419c27fecf17aba4a7ba0325e6defa2c6f147c 100644 (file)
@@ -159,7 +159,7 @@ struct Network {
         bool dhcp6_use_address;
         bool dhcp6_use_dns;
         bool dhcp6_use_dns_set;
-        bool dhcp6_use_fqdn;
+        bool dhcp6_use_hostname;
         bool dhcp6_use_ntp;
         bool dhcp6_use_ntp_set;
         bool dhcp6_rapid_commit;
index c8fb0565a45dfcb85d00451eb0e81dc3b1c1ea0c..d20fb78f153f68e2ddf8b4a3ce4c72a6ad24d097 100644 (file)
@@ -127,7 +127,7 @@ FallbackLeaseLifetimeSec=
 UseAddress=
 UseNTP=
 UseDNS=
-UseFQDN=
+UseHostname=
 RapidCommit=
 ForceDHCPv6PDOtherInformation=
 PrefixDelegationHint=