mirror of
https://github.com/systemd/systemd
synced 2024-09-06 16:56:43 +00:00
network: dhcp6: make UplinkInterface=:self take effect only when DHCPv6PrefixDelegation= is enabled
This commit is contained in:
parent
f6032ff3e0
commit
926fc8ee63
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue