mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-15 18:30:38 +01:00
device: take over unmanaged devices when explicitely deactivated
https://bugzilla.redhat.com/show_bug.cgi?id=1870691 Signed-off-by: Antonio Cardace <acardace@redhat.com>
This commit is contained in:
parent
91766a6910
commit
a4d37612c8
1 changed files with 6 additions and 0 deletions
|
|
@ -13272,6 +13272,12 @@ nm_device_disconnect_active_connection(NMActiveConnection * active,
|
|||
|
||||
if (NM_ACTIVE_CONNECTION(priv->act_request.obj) == active) {
|
||||
if (priv->state < NM_DEVICE_STATE_DEACTIVATING) {
|
||||
/* When the user actively deactivates a profile, we set
|
||||
* the sys-iface-state to managed so that we deconfigure/cleanup the interface.
|
||||
* But for external connections that go down otherwise, we don't want to touch the interface. */
|
||||
if (nm_device_sys_iface_state_is_external(self))
|
||||
nm_device_sys_iface_state_set(self, NM_DEVICE_SYS_IFACE_STATE_MANAGED);
|
||||
|
||||
nm_device_state_changed(self, NM_DEVICE_STATE_DEACTIVATING, device_reason);
|
||||
} else {
|
||||
/* @active is the current ac of @self, but it's going down already.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue