summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2021-07-12 09:28:36 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2021-07-13 09:43:04 +0200
commit62869621bd0e8c709ef29ce14d8fd5f2e38d45db (patch)
tree90f8b9a5ce4ca9e1993d8a810cc3ba11ded94835
parent1e3bbdfbbb85e4fa92950934ef7a71e80d3043f3 (diff)
downloadNetworkManager-bg/ipv6-pd.tar.gz
device: start DHCPv6 when a prefix delegation is neededbg/ipv6-pd
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
-rw-r--r--src/core/devices/nm-device.c4
1 files changed, 3 insertions, 1 deletions
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);
}
}