summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2017-05-08 08:44:51 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2017-05-08 15:44:14 +0200
commit179ad1ee2e51b9ea6d9bf0bc620d94aaeae7fc38 (patch)
treef5af1effb5c44413371a940b2fe09bbaed285318
parente6ff7f211d29ecce9e84ce2cf5291c9afc8c2add (diff)
downloadNetworkManager-179ad1ee2e51b9ea6d9bf0bc620d94aaeae7fc38.tar.gz
dhcp: set @was_active flag for external activations
Set the @was_active flag for external activations with DHCP, so that DHCP is retried multiple times in case of failure, as we do for managed connections when the lease expires and for assumed connections. Fixes test: renewal_gw_after_dhcp_outage_for_assumed_var1 Fixes: e3113fdc4b01d79080911b7450fc032dc0a85108 (cherry picked from commit ddfeed4530bb0ade4249025930da4f0456026d9f)
-rw-r--r--src/devices/nm-device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index ebae9992c5..9eb36ca57f 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -5844,7 +5844,7 @@ dhcp4_start (NMDevice *self,
nm_device_add_pending_action (self, NM_PENDING_ACTION_DHCP4, TRUE);
- if (nm_device_sys_iface_state_get (self) == NM_DEVICE_SYS_IFACE_STATE_ASSUME)
+ if (nm_device_sys_iface_state_is_external_or_assume (self))
priv->dhcp4.was_active = TRUE;
/* DHCP devices will be notified by the DHCP manager when stuff happens */
@@ -6645,8 +6645,8 @@ dhcp6_start_with_link_ready (NMDevice *self, NMConnection *connection)
self);
}
- if (nm_device_sys_iface_state_get (self) == NM_DEVICE_SYS_IFACE_STATE_ASSUME)
- priv->dhcp6.was_active = TRUE;
+ if (nm_device_sys_iface_state_is_external_or_assume (self))
+ priv->dhcp4.was_active = TRUE;
return !!priv->dhcp6.client;
}