From 62869621bd0e8c709ef29ce14d8fd5f2e38d45db Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Mon, 12 Jul 2021 09:28:36 +0200 Subject: [PATCH] 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 --- src/core/devices/nm-device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index d8867c5fbb..922e779bef 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -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); } }