summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Giudici <fgiudici@redhat.com>2018-02-08 18:28:10 +0100
committerFrancesco Giudici <fgiudici@redhat.com>2018-02-19 11:28:16 +0100
commit2e726a7418daf19a40ed618942fac4dea79a1209 (patch)
tree7f412dda16f06bfdf6596d2df93848678c1afd71
parentaf0427d78bf15c37d4403525dd59398f221f9458 (diff)
downloadNetworkManager-fg/dhcp_lease-rh1503587.tar.gz
device: enable DHCPv6 retries on lease renewal failurefg/dhcp_lease-rh1503587
https://bugzilla.gnome.org/show_bug.cgi?id=792745
-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.
*/