This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Bug 2177209 - nmcli doesn't accept space in connection.secondaries "VPN connection"
Summary: nmcli doesn't accept space in connection.secondaries "VPN connection"
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: NetworkManager
Version: 9.2
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Thomas Haller
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-10 12:10 UTC by David Jaša
Modified: 2023-08-17 12:26 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-17 12:26:10 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker NMT-374 0 None None None 2023-03-10 12:10:54 UTC
Red Hat Issue Tracker   RHEL-1444 0 None None None 2023-08-17 12:26:09 UTC
Red Hat Issue Tracker RHELPLAN-151428 0 None None None 2023-03-10 12:10:59 UTC
freedesktop.org Gitlab NetworkManager NetworkManager-ci merge_requests 1357 0 None merged connection.feature: secondaries: name with space, auto removal 2023-08-01 10:19:48 UTC
freedesktop.org Gitlab NetworkManager NetworkManager merge_requests 1635 0 None merged [th/cli-secondaries-escape-delimiter] support backslash escape for delimiters when setting "connection.secondaries" 2023-08-01 10:19:49 UTC

Description David Jaša 2023-03-10 12:10:08 UTC
Description of problem:
nmcli doesn't accept space in connection.secondaries "VPN connection"

Version-Release number of selected component (if applicable):
NetworkManager-1.42.2-1.el9.x86_64

How reproducible:
always

Steps to Reproduce:
1. nmcli c add con-name base_con ifname eth1 type ethernet connection.autoconnect no
2. nmcli c add con-name 'Open VPN' type vpn ifname '*' vpn-type openvpn
3. nmcli c modify base_con connection.secondaries "Open VPN"

Actual results:
Error: failed to modify connection.secondaries: 'Open' is not a name of any existing profile.

Expected results:
secondary profile of "Open VPN" is added and its UUID is visible in base_con's connection.secondaries

Additional info:
Already covered by NMCI scenario nmcli_space_in_secondaries

Comment 1 Thomas Haller 2023-05-23 07:28:26 UTC
ok, !1635 was not enough.

- the check at https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/6069f75e00806de5244fba6e923abf4f30b2f3b0/src/nmcli/settings.c#L612 needs to be dropped (moved).

- `.validate2_fcn = _multilist_validate2_fcn_uuid` needs to be replaced by a _multilist_validate2_fcn_connection_secondaries(). That callback must also get a `const NMMetaEnvironment *environment` and `gpointer environment_user_data` arguments. The `NMMetaEnvironment` needs to learn a new callback, that basically basically does what _set_fcn_precheck_connection_secondaries() currently does. It also needs the ability to return allocated new values (and the caller of `_multilist_do_validate()` needs to handle the ownership transfer.


Note You need to log in before you can comment on or make changes to this bug.