mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 15:50:07 +01:00
devices: "deactivate" devices when going from UNMANAGED->UNAVAILABLE
We used to call nm_device_deactivate() when moving a device from UNMANAGED to UNAVAILABLE (unless we were assuming the existing connection), but this got lost when default-unmanaged was added. Fix it to do this again, so the device will be in a known-clean state when it is activated.
This commit is contained in:
parent
7bc7da83ec
commit
46295e8fa1
1 changed files with 4 additions and 2 deletions
|
|
@ -6185,9 +6185,11 @@ nm_device_state_changed (NMDevice *device,
|
|||
* carrier changes or rfkill. But don't deactivate devices that are
|
||||
* about to assume a connection since that defeats the purpose of
|
||||
* assuming the device's existing connection.
|
||||
*
|
||||
* Note that we "deactivate" the device even when coming from
|
||||
* UNMANAGED, to ensure that it's in a clean state.
|
||||
*/
|
||||
if (reason != NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED &&
|
||||
old_state != NM_DEVICE_STATE_UNMANAGED)
|
||||
if (reason != NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED)
|
||||
nm_device_deactivate (device, reason);
|
||||
break;
|
||||
case NM_DEVICE_STATE_DISCONNECTED:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue