mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-07 09:50:28 +01:00
manager: do not create software devices when device was manually disconnected
We can only create virtual interfaces when the connection has autoconnect property *and* the device was not manually disconnected before. Without this commit NetworkManager would auto-activate all virtual connections when a change was done (e.g. new virtual connection was addded).
This commit is contained in:
parent
d0c2a24b71
commit
41d3efbd73
1 changed files with 9 additions and 2 deletions
|
|
@ -1219,9 +1219,16 @@ system_create_virtual_devices (NMManager *self)
|
|||
|
||||
g_assert (s_con);
|
||||
if (connection_needs_virtual_device (connection)) {
|
||||
/* We only create a virtual interface if the connection can autoconnect */
|
||||
if (nm_setting_connection_get_autoconnect (s_con))
|
||||
char *iface = get_virtual_iface_name (self, connection, NULL);
|
||||
|
||||
/* We only create a virtual interface if the connection can autoconnect
|
||||
* and the interface was not manually disconnected before.
|
||||
*/
|
||||
if ( nm_setting_connection_get_autoconnect (s_con)
|
||||
&& iface
|
||||
&& nm_manager_can_device_auto_connect (self, iface))
|
||||
system_create_virtual_device (self, connection);
|
||||
g_free (iface);
|
||||
}
|
||||
}
|
||||
g_slist_free (connections);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue