diff options
author | Susant Sahani <ssahani@vmware.com> | 2020-02-15 13:51:34 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-03-06 17:38:26 +0100 |
commit | cd305af1fe8521357799971127a5a008fcb247d8 (patch) | |
tree | 03569ad457e8385dee2f153e0fbfd364e6c4e548 /src/network/networkd-link.c | |
parent | systemd-resolved: use hostname for certificate validation in DoT (diff) | |
download | systemd-cd305af1fe8521357799971127a5a008fcb247d8.tar.xz systemd-cd305af1fe8521357799971127a5a008fcb247d8.zip |
network: Allow DHCPv6 client to start without router's managed flag.
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r-- | src/network/networkd-link.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index b46c875548..bac80ade84 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -1553,6 +1553,17 @@ static int link_acquire_ipv6_conf(Link *link) { return log_link_warning_errno(link, r, "Could not start IPv6 Router Advertisement: %m"); } + if (link_dhcp6_enabled(link) && link->network->dhcp6_without_ra) { + assert(link->dhcp6_client); + assert(in_addr_is_link_local(AF_INET6, (const union in_addr_union*)&link->ipv6ll_address) > 0); + + r = dhcp6_request_address(link, true); + if (r < 0 && r != -EBUSY) + return log_link_warning_errno(link, r, "Could not acquire DHCPv6 lease: %m"); + else + log_link_debug(link, "Acquiring DHCPv6 lease"); + } + (void) dhcp6_request_prefix_delegation(link); return 0; |