]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: rename IPv6AcceptRouterAdvertisements to IPv6AcceptRA 3456/head
authorLennart Poettering <lennart@poettering.net>
Tue, 7 Jun 2016 09:19:26 +0000 (11:19 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 7 Jun 2016 09:24:30 +0000 (11:24 +0200)
The long name is just too hard to type. We generally should avoid using
acronyms too liberally, if they aren't established enough, but it appears that
"RA" is known well enough. Internally we call the option "ipv6_accept_ra"
anyway, and the kernel also exposes it under this name. Hence, let's rename the
IPv6AcceptRouterAdvertisements= setting and the
[IPv6AcceptRouterAdvertisements] section to IPv6AcceptRA= and [IPv6AcceptRA].

The old setting IPv6AcceptRouterAdvertisements= is kept for compatibility with
older configuration. (However the section [IPv6AcceptRouterAdvertisements] is
not, as it was never available in a published version of systemd.

man/systemd.network.xml
src/network/networkd-network-gperf.gperf
src/network/networkd-network.c
test/networkd-test.py

index 487bb2ab3f97e2ddcfe3e80421358750490177fd..24deb0d1d7a784a57f0debec91b87a29ab960d42 100644 (file)
             By enabling DHCPv6 support explicitly, the DHCPv6 client will
             be started regardless of the presence of routers on the link,
             or what flags the routers pass. See
-            <literal>IPv6AcceptRouterAdvertisements=</literal>.</para>
+            <literal>IPv6AcceptRA=</literal>.</para>
 
             <para>Furthermore, note that by default the domain name
             specified through DHCP is not used for name resolution.
           <literal>no</literal>.</para></listitem>
         </varlistentry>
         <varlistentry>
-          <term><varname>IPv6AcceptRouterAdvertisements=</varname></term>
+          <term><varname>IPv6AcceptRA=</varname></term>
           <listitem><para>Enable or disable IPv6 Router Advertisement (RA) reception support for the interface.  Takes
           a boolean parameter. If true, RAs are accepted; if false, RAs are ignored, independently of the local
           forwarding state. When not set, the kernel default is used, and RAs are accepted only when local forwarding
           the relevant flags are set in the RA data, or if no routers are found on the link.</para>
 
           <para>Further settings for the IPv6 RA support may be configured in the
-          <literal>[IPv6AcceptRouterAdvertisements]</literal> section, see below.</para>
+          <literal>[IPv6AcceptRA]</literal> section, see below.</para>
 
           <para>Also see <ulink
           url="https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt">ip-sysctl.txt</ulink> in the kernel
     </refsect1>
 
   <refsect1>
-    <title>[IPv6AcceptRouterAdvertisements] Section Options</title>
-      <para>The <literal>[IPv6AcceptRouterAdvertisements]</literal> section configures the IPv6 Router Advertisement
-      (RA) client, if it is enabled with the <varname>IPv6AcceptRouterAdvertisements=</varname> setting described
+    <title>[IPv6AcceptRA] Section Options</title>
+      <para>The <literal>[IPv6AcceptRA]</literal> section configures the IPv6 Router Advertisement
+      (RA) client, if it is enabled with the <varname>IPv6AcceptRA=</varname> setting described
       above:</para>
 
       <variablelist class='network-directives'>
index c722db55c712e1d700d30cb6b24509986f1fdc66..d9f5b95cdf9c658db6c5367328f8d44abb2bc89d 100644 (file)
@@ -55,6 +55,8 @@ Network.NTP,                            config_parse_strv,
 Network.IPForward,                      config_parse_address_family_boolean_with_kernel,0,                             offsetof(Network, ip_forward)
 Network.IPMasquerade,                   config_parse_bool,                              0,                             offsetof(Network, ip_masquerade)
 Network.IPv6PrivacyExtensions,          config_parse_ipv6_privacy_extensions,           0,                             offsetof(Network, ipv6_privacy_extensions)
+Network.IPv6AcceptRA,                   config_parse_tristate,                          0,                             offsetof(Network, ipv6_accept_ra)
+/* legacy alias for the above */
 Network.IPv6AcceptRouterAdvertisements, config_parse_tristate,                          0,                             offsetof(Network, ipv6_accept_ra)
 Network.IPv6DuplicateAddressDetection,  config_parse_int,                               0,                             offsetof(Network, ipv6_dad_transmits)
 Network.IPv6HopLimit,                   config_parse_int,                               0,                             offsetof(Network, ipv6_hop_limit)
@@ -89,8 +91,8 @@ DHCP.DUIDRawData,                       config_parse_duid_rawdata,
 DHCP.RouteMetric,                       config_parse_unsigned,                          0,                             offsetof(Network, dhcp_route_metric)
 DHCP.UseTimezone,                       config_parse_bool,                              0,                             offsetof(Network, dhcp_use_timezone)
 DHCP.IAID,                              config_parse_iaid,                              0,                             offsetof(Network, iaid)
-IPv6AcceptRouterAdvertisements.UseDNS   config_parse_bool,                              0,                             offsetof(Network, ipv6_accept_ra_use_dns)
-IPv6AcceptRouterAdvertisements.UseDomains config_parse_dhcp_use_domains,                0,                             offsetof(Network, ipv6_accept_ra_use_domains)
+IPv6AcceptRA.UseDNS,                    config_parse_bool,                              0,                             offsetof(Network, ipv6_accept_ra_use_dns)
+IPv6AcceptRA.UseDomains,                config_parse_dhcp_use_domains,                  0,                             offsetof(Network, ipv6_accept_ra_use_domains)
 DHCPServer.MaxLeaseTimeSec,             config_parse_sec,                               0,                             offsetof(Network, dhcp_server_max_lease_time_usec)
 DHCPServer.DefaultLeaseTimeSec,         config_parse_sec,                               0,                             offsetof(Network, dhcp_server_default_lease_time_usec)
 DHCPServer.EmitDNS,                     config_parse_bool,                              0,                             offsetof(Network, dhcp_server_emit_dns)
index e961db60a71cc519a71f7fb5bc2cd15529067b54..c03c0f0bed10aa3c2b548e075a40c03393e8bc7c 100644 (file)
@@ -145,6 +145,7 @@ static int network_load_one(Manager *manager, const char *filename) {
                          "DHCP\0"
                          "DHCPv4\0" /* compat */
                          "DHCPServer\0"
+                         "IPv6AcceptRA\0"
                          "Bridge\0"
                          "BridgeFDB\0",
                          config_item_perf_lookup, network_network_gperf_lookup,
index f94224cce2b258d81a39a72dbaec88242d330044..78da0a213a9ed0554e361b062f6763aa17130653 100755 (executable)
@@ -205,7 +205,7 @@ DHCP=%s
     def test_coldplug_dhcp_yes_ip4_no_ra(self):
         # with disabling RA explicitly things should be fast
         self.do_test(coldplug=True, ipv6=False,
-                     extra_opts='IPv6AcceptRouterAdvertisements=False')
+                     extra_opts='IPv6AcceptRA=False')
 
     def test_coldplug_dhcp_ip4_only(self):
         # we have a 12s timeout on RA, so we need to wait longer
@@ -215,7 +215,7 @@ DHCP=%s
     def test_coldplug_dhcp_ip4_only_no_ra(self):
         # with disabling RA explicitly things should be fast
         self.do_test(coldplug=True, ipv6=False, dhcp_mode='ipv4',
-                     extra_opts='IPv6AcceptRouterAdvertisements=False')
+                     extra_opts='IPv6AcceptRA=False')
 
     def test_coldplug_dhcp_ip6(self):
         self.do_test(coldplug=True, ipv6=True)