mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 02:30:08 +01:00
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: adbf383628
https://bugzilla.redhat.com/show_bug.cgi?id=1452046
This commit is contained in:
parent
6b1dcb3641
commit
d4a033c4ad
1 changed files with 3 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue