summaryrefslogtreecommitdiff
path: root/src/devices/nm-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/nm-device.c')
-rw-r--r--src/devices/nm-device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index bae5ab99d0..4bb610bc64 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -7080,13 +7080,15 @@ static void
dhcp6_fail (NMDevice *self, gboolean timeout)
{
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
+ gboolean is_dhcp_managed;
_LOGD (LOGD_DHCP6, "DHCPv6 failed: timeout %d, num tries left %u",
timeout, priv->dhcp6.num_tries_left);
+ is_dhcp_managed = (priv->dhcp6.mode == NM_NDISC_DHCP_LEVEL_MANAGED);
dhcp6_cleanup (self, CLEANUP_TYPE_DECONFIGURE, FALSE);
- if (priv->dhcp6.mode == NM_NDISC_DHCP_LEVEL_MANAGED) {
+ if (is_dhcp_managed || priv->dhcp6.num_tries_left < DHCP_NUM_TRIES_MAX) {
/* Don't fail if there are static addresses configured on
* the device, instead retry after some time.
*/