diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2019-12-13 18:05:38 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2019-12-14 21:16:22 +0100 |
commit | 46119ea1ad7404f217dd239b17ae4545a1d0d43f (patch) | |
tree | 1278446327e54da7960a535234fb683ded34e079 | |
parent | 6d6e1402dc6e68688b05d7df3f5a05957db56e7e (diff) | |
download | NetworkManager-bg/rh1765047.tar.gz |
manager: create a virtual device only if the connection can autoconnectbg/rh1765047
The autoconnection for virtual devices currently works in two
phases. First we detect that there is suitable profile that can
autoconnect and we realize the device. Then, when the device becomes
'disconnected', autoconnect kicks in and starts the activation.
However, if autoconnect is blocked for a device, currently we do step
1 without step 2, leaving a stale interface around. Fix this by also
checking that autoconnect is not blocked during step 1.
https://bugzilla.redhat.com/show_bug.cgi?id=1765047
-rw-r--r-- | src/nm-manager.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c index b1810474b0..13e01c0b7c 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -2024,7 +2024,8 @@ system_create_virtual_device (NMManager *self, NMConnection *connection) s_con = nm_connection_get_setting_connection (candidate); g_assert (s_con); - if (!nm_setting_connection_get_autoconnect (s_con)) + if ( !nm_setting_connection_get_autoconnect (s_con) + || nm_settings_connection_autoconnect_is_blocked (connections[i])) continue; /* Create any backing resources the device needs */ |