]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: dhcp6: make UplinkInterface=:self take effect only when DHCPv6PrefixDelegati...
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 1 Dec 2021 05:48:51 +0000 (14:48 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 1 Dec 2021 11:35:03 +0000 (20:35 +0900)
man/systemd.network.xml
src/network/networkd-dhcp6.c

index fb2569a9dd87cc7f7675da91c64b190c920a9763..1457b3e6915f2af9844e7645cd278fcff3427a85 100644 (file)
@@ -2106,11 +2106,12 @@ Table=1234</programlisting></para>
           <listitem>
             <para>Allows DHCPv6 client to start without router advertisements's managed or other
             address configuration flag. Takes one of <literal>no</literal>, <literal>solicit</literal>
-            or <literal>information-request</literal>. When this is not specified and
-            <varname>UplinkInterface=:self</varname> is specified, then <literal>solicit</literal> is
-            implied. Otherwise, defaults to <literal>no</literal>, and the DHCPv6 client will be
-            started when an RA is received. See also <varname>DHCPv6Client=</varname> setting in the
-            [IPv6AcceptRA] section.</para>
+            or <literal>information-request</literal>. If this is not specified,
+            <literal>solicit</literal> is used when <varname>DHCPv6PrefixDelegation=</varname> is
+            enabled and <varname>UplinkInterface=:self</varname> is specified in the
+            [DHCPv6PrefixDelegation] section. Otherwise, defaults to <literal>no</literal>, and the
+            DHCPv6 client will be started when an RA is received. See also
+            <varname>DHCPv6Client=</varname> setting in the [IPv6AcceptRA] section.</para>
           </listitem>
         </varlistentry>
       </variablelist>
index da5a22a7b560f06a965dd1fca1027f8762050907..5c9c21166293cd9c2d6c393859290cd1e94fb026 100644 (file)
@@ -70,6 +70,9 @@ static DHCP6ClientStartMode link_get_dhcp6_client_start_mode(Link *link) {
         if (link->network->dhcp6_client_start_mode >= 0)
                 return link->network->dhcp6_client_start_mode;
 
+        if (!link_dhcp6_pd_is_enabled(link))
+                return DHCP6_CLIENT_START_MODE_NO;
+
         if (dhcp6_pd_resolve_uplink(link, &uplink) < 0)
                 return DHCP6_CLIENT_START_MODE_NO;