mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-23 01:30:09 +01:00
core: fix IP_DONE vs. IP_FAIL states
0652d9c596 changed IP states like this:
| old behaviour | new behaviour
---------------------------------------------------------
success | IP_DONE && config is not NULL | IP_DONE
failure | IP_DONE && config is NULL | IP_FAIL
But some failure paths was not updated.
This commit is contained in:
parent
ca6b360089
commit
e2b7c4824d
1 changed files with 3 additions and 3 deletions
|
|
@ -2201,7 +2201,7 @@ dhcp4_fail (NMDevice *device, gboolean timeout)
|
||||||
|
|
||||||
if (timeout || (priv->ip4_state == IP_CONF))
|
if (timeout || (priv->ip4_state == IP_CONF))
|
||||||
nm_device_activate_schedule_ip4_config_timeout (device);
|
nm_device_activate_schedule_ip4_config_timeout (device);
|
||||||
else if (priv->ip4_state == IP_DONE)
|
else if (priv->ip4_state == IP_FAIL)
|
||||||
nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED);
|
nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2649,7 +2649,7 @@ dhcp6_fail (NMDevice *device, gboolean timeout)
|
||||||
|
|
||||||
if (timeout || (priv->ip6_state == IP_CONF))
|
if (timeout || (priv->ip6_state == IP_CONF))
|
||||||
nm_device_activate_schedule_ip6_config_timeout (device);
|
nm_device_activate_schedule_ip6_config_timeout (device);
|
||||||
else if (priv->ip6_state == IP_DONE)
|
else if (priv->ip6_state == IP_FAIL)
|
||||||
nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED);
|
nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3496,7 +3496,7 @@ nm_device_activate_ip6_config_timeout (gpointer user_data)
|
||||||
}
|
}
|
||||||
g_assert (ret == NM_ACT_STAGE_RETURN_SUCCESS);
|
g_assert (ret == NM_ACT_STAGE_RETURN_SUCCESS);
|
||||||
|
|
||||||
priv->ip6_state = IP_DONE;
|
priv->ip6_state = IP_FAIL;
|
||||||
|
|
||||||
/* If IPv6 failed and IPv4 failed, the activation fails */
|
/* If IPv6 failed and IPv4 failed, the activation fails */
|
||||||
if (priv->ip4_state == IP_FAIL)
|
if (priv->ip4_state == IP_FAIL)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue