device: start DHCPv6 when a prefix delegation is needed

If a prefix delegation is needed, currently NM restarts DHCPv6 on the
device with default route, but only if DHCPv6 was already running.

Allow the device to start DHCPv6 for a PD even if it was running
without DHCPv6.

See also: https://github.com/coreos/fedora-coreos-tracker/issues/888
This commit is contained in:
Beniamino Galvani 2021-07-12 09:28:36 +02:00
parent 1e3bbdfbbb
commit 62869621bd

View file

@ -10110,7 +10110,9 @@ nm_device_request_ip6_prefixes(NMDevice *self, int needed_prefixes)
_LOGD(LOGD_IP6, "ipv6-pd: asking DHCPv6 for %d prefixes", needed_prefixes);
nm_device_dhcp6_renew(self, FALSE);
} else {
_LOGI(LOGD_IP6, "ipv6-pd: device doesn't use DHCPv6, can't request prefixes");
priv->dhcp6.mode = NM_NDISC_DHCP_LEVEL_OTHERCONF;
_LOGD(LOGD_DEVICE | LOGD_DHCP6, "ipv6-pd: starting DHCPv6 to request a prefix");
dhcp6_start(self, FALSE);
}
}