mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 01:47:58 +02: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:adbf383628https://bugzilla.redhat.com/show_bug.cgi?id=1452046 (cherry picked from commitd4a033c4ad)
This commit is contained in:
parent
6fdf96d1d7
commit
cf726a51b9
1 changed files with 3 additions and 2 deletions
|
|
@ -3195,8 +3195,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));
|
||||
|
|
@ -3561,6 +3559,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