mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 22:10:09 +01:00
device: set device's sys-iface-state only shortly before activating device
During _new_active_connection() we just create the NMActiveConnection instance to proceed with authorization. The caller might not even authorize, so we must not touch the device yet. Do that only later.
This commit is contained in:
parent
9fe4239f33
commit
c3fb02641a
1 changed files with 3 additions and 3 deletions
|
|
@ -3806,6 +3806,9 @@ _internal_activate_device (NMManager *self, NMActiveConnection *active, GError *
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (nm_active_connection_get_activation_type (active) == NM_ACTIVATION_TYPE_MANAGED)
|
||||
nm_device_sys_iface_state_set (device, NM_DEVICE_SYS_IFACE_STATE_MANAGED);
|
||||
|
||||
/* Create any backing resources the device needs */
|
||||
if (!nm_device_is_real (device)) {
|
||||
NMDevice *parent;
|
||||
|
|
@ -4065,9 +4068,6 @@ _new_active_connection (NMManager *self,
|
|||
subject);
|
||||
}
|
||||
|
||||
if (activation_type == NM_ACTIVATION_TYPE_MANAGED)
|
||||
nm_device_sys_iface_state_set (device, NM_DEVICE_SYS_IFACE_STATE_MANAGED);
|
||||
|
||||
return (NMActiveConnection *) nm_act_request_new (settings_connection,
|
||||
applied,
|
||||
specific_object,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue