diff options
author | Francesco Giudici <fgiudici@redhat.com> | 2017-06-16 15:46:52 +0200 |
---|---|---|
committer | Francesco Giudici <fgiudici@redhat.com> | 2017-06-21 16:12:09 +0200 |
commit | d4a033c4ad4ef4119eedfecae8e41e5ab2da4437 (patch) | |
tree | d3e0ca538bc62a271391f6e147d6ee4b8a5132e8 | |
parent | 6b1dcb3641780d5e587d802a1b8670a39b86877d (diff) | |
download | NetworkManager-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.c | 5 |
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, |