NetworkManager/clients
Thomas Haller 8bd6d2a63e cli: fix showing active state for nmcli con show with fields
With "connection.multi-connect", a profile can be activated multiple
times on a device with `nmcli connection show`. Also, a profile may be
in the process of deactivating on one device, while activating on
another one. So, in general it's possible that `nmcli connection show`
lists the same profile on multiple lines (reflecting their multiple
activation states).

If the user requests no fields that are part of the activation state,
then the active connections are ignored. For example with `nmcli
-f UUID,NAME connection show`. In that case, each profile is listed only
once.

On the other hand, with `nmcli -g UUID,NAME,DEVICE connection show` the
user again requested also to see the activation state, and a profile can
appear multiple times.

To handle that, we need to consider which fields were requested.

There was a bug where the "ACTIVE" field was not treated as part of the
activation state. That results in `nmcli -f UUID,NAME,ACTIVE connection
show` always returning "no". Fix that.

Fixes: a1b25a47b0 ('cli: rework printing of `nmcli connection` for multiple active connections')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/547

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/642
(cherry picked from commit 4eb3b5b9dd)
(cherry picked from commit bb802507e4)
2020-10-13 21:47:14 +02:00
..
cli cli: fix showing active state for nmcli con show with fields 2020-10-13 21:47:14 +02:00
cloud-setup all: avoid wrong compiler warning about uninitalized variables with LTO 2020-08-17 15:40:05 +02:00
common libnm-core,clients: add support for ipv4.dhcp-vendor-class-identifier option 2020-08-26 11:57:19 +02:00
tests libnm-core,clients: add support for ipv4.dhcp-vendor-class-identifier option 2020-08-26 11:57:19 +02:00
tui tui: allow configuring "primary" bond option with "balance-{alb,tlb}" 2020-09-10 22:17:05 +02:00
meson.build docs: generate nm-settings-docs-nmcli.xml based on nmcli meta data 2020-06-11 10:53:50 +02:00
nm-online.c nm-online: allow configuring timeout via NM_ONLINE_TIMEOUT environment 2020-04-30 21:46:59 +02:00