From b6d2ad3312eea21effbd8d6d5fe32056ccf89cb8 Mon Sep 17 00:00:00 2001 From: Francesco Giudici Date: Thu, 8 Feb 2018 18:28:10 +0100 Subject: [PATCH] device: enable DHCPv6 retries on lease renewal failure https://bugzilla.gnome.org/show_bug.cgi?id=792745 (cherry picked from commit 1289450146e2b212cabca500cb8009f910651661) --- src/devices/nm-device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index f6d3f4c049..eb91dc2571 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -6799,13 +6799,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. */