From: Yu Watanabe Date: Wed, 1 Dec 2021 05:48:51 +0000 (+0900) Subject: network: dhcp6: make UplinkInterface=:self take effect only when DHCPv6PrefixDelegati... X-Git-Tag: v250-rc1~95^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=926fc8ee6360980682ffb50d2e3dcbe961316b74;p=thirdparty%2Fsystemd.git network: dhcp6: make UplinkInterface=:self take effect only when DHCPv6PrefixDelegation= is enabled --- diff --git a/man/systemd.network.xml b/man/systemd.network.xml index fb2569a9dd8..1457b3e6915 100644 --- a/man/systemd.network.xml +++ b/man/systemd.network.xml @@ -2106,11 +2106,12 @@ Table=1234 Allows DHCPv6 client to start without router advertisements's managed or other address configuration flag. Takes one of no, solicit - or information-request. When this is not specified and - UplinkInterface=:self is specified, then solicit is - implied. Otherwise, defaults to no, and the DHCPv6 client will be - started when an RA is received. See also DHCPv6Client= setting in the - [IPv6AcceptRA] section. + or information-request. If this is not specified, + solicit is used when DHCPv6PrefixDelegation= is + enabled and UplinkInterface=:self is specified in the + [DHCPv6PrefixDelegation] section. Otherwise, defaults to no, and the + DHCPv6 client will be started when an RA is received. See also + DHCPv6Client= setting in the [IPv6AcceptRA] section. diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c index da5a22a7b56..5c9c2116629 100644 --- a/src/network/networkd-dhcp6.c +++ b/src/network/networkd-dhcp6.c @@ -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;