diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 75b07d2f03..21f50b0274 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -2686,8 +2686,10 @@ dhcp4_fail (NMDevice *self, gboolean timeout) dhcp4_cleanup (self, TRUE, FALSE); if (timeout || (priv->ip4_state == IP_CONF)) nm_device_activate_schedule_ip4_config_timeout (self); - else if (priv->ip4_state == IP_FAIL) + else if (priv->ip4_state == IP_DONE) nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED); + else + g_warn_if_reached (); } static void @@ -3121,8 +3123,10 @@ dhcp6_fail (NMDevice *self, gboolean timeout) if (priv->dhcp6_mode == NM_RDISC_DHCP_LEVEL_MANAGED) { if (timeout || (priv->ip6_state == IP_CONF)) nm_device_activate_schedule_ip6_config_timeout (self); - else if (priv->ip6_state == IP_FAIL) + else if (priv->ip6_state == IP_DONE) nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED); + else + g_warn_if_reached (); } else { /* not a hard failure; just live with the RA info */ if (priv->ip6_state == IP_CONF) diff --git a/src/dhcp-manager/nm-dhcp-client.c b/src/dhcp-manager/nm-dhcp-client.c index 75a243649f..76700628ec 100644 --- a/src/dhcp-manager/nm-dhcp-client.c +++ b/src/dhcp-manager/nm-dhcp-client.c @@ -178,7 +178,9 @@ reason_to_state (const char *iface, const char *reason) return NM_DHCP_STATE_DONE; else if (g_ascii_strcasecmp (reason, "fail") == 0 || g_ascii_strcasecmp (reason, "abend") == 0 || - g_ascii_strcasecmp (reason, "nak") == 0) + g_ascii_strcasecmp (reason, "nak") == 0 || + g_ascii_strcasecmp (reason, "expire") == 0 || + g_ascii_strcasecmp (reason, "expire6") == 0) return NM_DHCP_STATE_FAIL; nm_log_dbg (LOGD_DHCP, "(%s): unmapped DHCP state '%s'", iface, reason);