mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 08:00:18 +01:00
core: ensure ActiveConnections are torn down when device is unavailable (bgo #676285)
If a device becomes unmanaged or unavailable (eg, due to loss of carrier, becoming unmanaged, rfkilled, supplicant crashing, etc), the ActiveConnection would simply set state to UNKNOWN and the Manager wouldn't tear it down and remove it from the ActiveConnections property list. Instead, these states should be treated the same as if the device was deactivated cleanly so that the AC will accurately reflect the device state and the Manager will clean the AC up. Fixes comment #12 in: https://bugzilla.gnome.org/show_bug.cgi?id=676285
This commit is contained in:
parent
b39b4e9cf3
commit
22d2f571ce
1 changed files with 2 additions and 0 deletions
|
|
@ -318,6 +318,8 @@ device_state_changed (NMDevice *device, GParamSpec *pspec, NMActRequest *self)
|
|||
break;
|
||||
case NM_DEVICE_STATE_FAILED:
|
||||
case NM_DEVICE_STATE_DISCONNECTED:
|
||||
case NM_DEVICE_STATE_UNMANAGED:
|
||||
case NM_DEVICE_STATE_UNAVAILABLE:
|
||||
ac_state = NM_ACTIVE_CONNECTION_STATE_DEACTIVATED;
|
||||
|
||||
/* No longer need to pay attention to device state */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue