diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2021-04-30 22:35:20 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2021-05-04 08:48:29 +0200 |
commit | 23cc0bf3353ea43d95a906e27c9881b1b68e2bbe (patch) | |
tree | 89ef7a8c97b93c452081c008b418271fcf6add90 | |
parent | ad2226eacd58f7fa363b4258fe5fd0fc113915c9 (diff) | |
download | NetworkManager-23cc0bf3353ea43d95a906e27c9881b1b68e2bbe.tar.gz |
manager: fix assertion failure in active_connection_find()bg/rh1933719
Active-connections in the async_op_lst are not guaranteed to have a
settings-connection. In particular, the settings-connection for an
AddAndActivate() AC is set only after the authorization succeeds. Use
the non-asserting variant of the function to fix the following
failure:
nm_active_connection_get_settings_connection: assertion 'sett_conn' failed
1 _g_log_abort()
2 g_logv()
3 g_log()
4 _nm_g_return_if_fail_warning.constprop.14()
5 nm_active_connection_get_settings_connection()
6 active_connection_find()
7 _get_activatable_connections_filter()
8 nm_settings_get_connections_clone()
9 nm_manager_get_activatable_connections()
10 auto_activate_device_cb()
11 g_idle_dispatch()
12 g_main_context_dispatch()
13 g_main_context_iterate.isra.21()
14 g_main_loop_run()
15 main()
Fixes: 33b9fa3a3caf ('manager: Keep volatile/external connections while referenced by async_op_lst')
https://bugzilla.redhat.com/show_bug.cgi?id=1933719
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/834
-rw-r--r-- | src/core/nm-manager.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/nm-manager.c b/src/core/nm-manager.c index 216dc8d2dd..e866eec0d9 100644 --- a/src/core/nm-manager.c +++ b/src/core/nm-manager.c @@ -1021,7 +1021,7 @@ active_connection_find( NMSettingsConnection *ac_conn; ac = async_op_data->ac_auth.active; - ac_conn = nm_active_connection_get_settings_connection(ac); + ac_conn = _nm_active_connection_get_settings_connection(ac); if (sett_conn && sett_conn != ac_conn) continue; if (uuid && !nm_streq0(uuid, nm_settings_connection_get_uuid(ac_conn))) |