summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-04-17 07:31:13 +0200
committerThomas Haller <thaller@redhat.com>2018-04-18 07:55:15 +0200
commitc3fb02641a22412c6094bb0b54d3945dedbe1237 (patch)
tree4499b9dc85343157d20466e5a73a7773623802af
parent9fe4239f33d13f06cf375ffb900071f612079193 (diff)
downloadNetworkManager-th/manager-cleanup.tar.gz
device: set device's sys-iface-state only shortly before activating deviceth/manager-cleanup
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.
-rw-r--r--src/nm-manager.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c
index 9b0654c7a6..e692aea54f 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -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,