diff options
author | Thomas Haller <thaller@redhat.com> | 2023-01-10 23:39:58 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2023-01-17 09:34:28 +0100 |
commit | 7af9562f28f2e80fed41262e0f82510be7cf8c8e (patch) | |
tree | f971a2bbe98ba53ae6cd9bcb7139b0811c02857a /contrib | |
parent | f930d55fea4a9cd7cd7b7cd9c6875be58719ef4c (diff) | |
download | NetworkManager-7af9562f28f2e80fed41262e0f82510be7cf8c8e.tar.gz |
device: fix available-connections for a device for user-request
There are two callers of available_connections_add(). One from
cp_connection_added_or_updated() (which is when a connection
gets added/modified) and one from nm_device_recheck_available_connections().
They both call first nm_device_check_connection_available() to see
whether the profile is available on the device. They certainly
need to pass the same check flags, otherwise a profile might
be available in some cases, and not in others.
I didn't actually test this, but I think this could result
in a profile wrongly not being listed as an available-connection.
Moreover, that might mean, that `nmcli connection up $PROFILE`
might work to find the device/profile, but `nmcli device up $DEVICE`
couldn't find the suitable profile (because the latter calls
nm_device_get_best_connection(), which iterates the
available-connections). I didn't test this, because regardless of
that, it seems obvious that the conditions for when we call
available_connections_add() must be the same from both places.
So the only question is what is the right condition, and it would
seem that _NM_DEVICE_CHECK_CON_AVAILABLE_FOR_USER_REQUEST is the right
flag.
Fixes: 02dbe670ca0a ('device: for available connections check whether they are available for user-request')
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1496
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions