summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Giudici <fgiudici@redhat.com>2017-06-16 15:46:52 +0200
committerFrancesco Giudici <fgiudici@redhat.com>2017-06-21 16:12:09 +0200
commitd4a033c4ad4ef4119eedfecae8e41e5ab2da4437 (patch)
treed3e0ca538bc62a271391f6e147d6ee4b8a5132e8
parent6b1dcb3641780d5e587d802a1b8670a39b86877d (diff)
downloadNetworkManager-d4a033c4ad4ef4119eedfecae8e41e5ab2da4437.tar.gz
manager: when a connection is upped on a device, do an early update of its internal state
When a user forces up a connection on a device, mark earlier the device as managed: this would allow proper clean-up on the device also when it was previously unmanaged or assumed. This would avoid skipping IPv6LL address generation when instead it was needed. Fixes: adbf383628138b4f868456996123c4900537a4fb https://bugzilla.redhat.com/show_bug.cgi?id=1452046
-rw-r--r--src/nm-manager.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c
index 9ea3e403f4..90ad66403e 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -3178,8 +3178,6 @@ unmanaged_to_disconnected (NMDevice *device)
* and force the device to be managed. */
nm_device_set_unmanaged_by_flags (device, NM_UNMANAGED_PLATFORM_INIT, FALSE, NM_DEVICE_STATE_REASON_USER_REQUESTED);
- if (nm_device_sys_iface_state_get (device) == NM_DEVICE_SYS_IFACE_STATE_REMOVED)
- nm_device_sys_iface_state_set (device, NM_DEVICE_SYS_IFACE_STATE_ASSUME);
nm_device_set_unmanaged_by_flags (device, NM_UNMANAGED_USER_EXPLICIT, FALSE, NM_DEVICE_STATE_REASON_USER_REQUESTED);
g_return_if_fail (nm_device_get_managed (device, FALSE));
@@ -3544,6 +3542,9 @@ _new_active_connection (NMManager *self,
error);
}
+ if (device && (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,