device: make devices 'external' when going to 'unmanaged' state

This is the default state for new devices hence they should
return back to this state when unmanaged.

Signed-off-by: Antonio Cardace <acardace@redhat.com>
This commit is contained in:
Antonio Cardace 2021-01-21 16:49:46 +01:00
parent 6ddfee3751
commit 91766a6910
No known key found for this signature in database
GPG key ID: 6BF80ABD43E377D3

View file

@ -16390,9 +16390,9 @@ _set_state_full(NMDevice *self, NMDeviceState state, NMDeviceStateReason reason,
nm_device_hw_addr_reset(self, "unmanage");
set_nm_ipv6ll(self, FALSE);
restore_ip6_properties(self);
break;
}
}
nm_device_sys_iface_state_set(self, NM_DEVICE_SYS_IFACE_STATE_EXTERNAL);
break;
case NM_DEVICE_STATE_UNAVAILABLE:
if (old_state == NM_DEVICE_STATE_UNMANAGED) {