summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/devices/nm-device.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 9a40a0dd5e..fc71ad8f11 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -6830,11 +6830,12 @@ dhcp4_grace_period_expired (gpointer user_data)
}
static void
-dhcp4_fail (NMDevice *self, gboolean timeout)
+dhcp4_fail (NMDevice *self)
{
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
- _LOGD (LOGD_DHCP4, "DHCPv4 failed%s", timeout ? " (timeout)" : "");
+ _LOGD (LOGD_DHCP4, "DHCPv4 failed (ip_state %s)",
+ _ip_state_to_string (priv->ip4_state));
/* Keep client running if there are static addresses configured
* on the interface.
@@ -6848,7 +6849,7 @@ dhcp4_fail (NMDevice *self, gboolean timeout)
* configuration.
*/
if ( !priv->dhcp4.was_active
- && (timeout || priv->ip4_state == IP_CONF)) {
+ && priv->ip4_state == IP_CONF) {
dhcp4_cleanup (self, CLEANUP_TYPE_DECONFIGURE, FALSE);
nm_device_activate_schedule_ip4_config_timeout (self);
return;
@@ -6911,7 +6912,7 @@ dhcp4_state_changed (NMDhcpClient *client,
case NM_DHCP_STATE_BOUND:
if (!ip4_config) {
_LOGW (LOGD_DHCP4, "failed to get IPv4 config in response to DHCP event.");
- dhcp4_fail (self, FALSE);
+ dhcp4_fail (self);
break;
}
@@ -6950,11 +6951,11 @@ dhcp4_state_changed (NMDhcpClient *client,
if (dhcp4_lease_change (self, ip4_config))
nm_device_update_metered (self);
else
- dhcp4_fail (self, FALSE);
+ dhcp4_fail (self);
}
break;
case NM_DHCP_STATE_TIMEOUT:
- dhcp4_fail (self, TRUE);
+ dhcp4_fail (self);
break;
case NM_DHCP_STATE_EXPIRE:
/* Ignore expiry before we even have a lease (NAK, old lease, etc) */
@@ -6963,7 +6964,7 @@ dhcp4_state_changed (NMDhcpClient *client,
/* fall through */
case NM_DHCP_STATE_DONE:
case NM_DHCP_STATE_FAIL:
- dhcp4_fail (self, FALSE);
+ dhcp4_fail (self);
break;
default:
break;