mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-25 19:40:28 +01:00
cli: check we have an active connection before showing hint
If the activation fails even before the active connection instance is
created, we get the following:
$ nmcli connection up vpn1
libnm-CRITICAL **: nm_active_connection_get_connection: assertion 'NM_IS_ACTIVE_CONNECTION (connection)' failed
nmcli-CRITICAL **: active_connection_hint: assertion 'connection' failed
Error: Connection activation failed: Not authorized to control networking.
Check that we have an active connection before showing the hint.
Fixes: bc6c042d54
This commit is contained in:
parent
c925b72e1f
commit
c0fc85f3c4
1 changed files with 3 additions and 0 deletions
|
|
@ -2352,6 +2352,9 @@ active_connection_hint (GString *return_text,
|
|||
const GPtrArray *devices;
|
||||
guint i;
|
||||
|
||||
if (!active)
|
||||
return;
|
||||
|
||||
if (!nm_streq (NM_CONFIG_DEFAULT_LOGGING_BACKEND, "journal"))
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue