From 16e2c9f155dd16af9c99de71ce2e182b479d4444 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 22 May 2023 09:18:28 +0200 Subject: [PATCH] cli: support escaping delimiters for "connection.seconaries" It's obviously a change in behavior. Now accept backslash for escaping the whitespace+comma separators when setting "connection.secondaries". Before: $ nmcli --offline connection add type ethernet con-name x connection.secondaries 'a b' Error: failed to modify connection.secondaries: the value 'a' is not a valid UUID. $ nmcli --offline connection add type ethernet con-name x connection.secondaries 'a\ b' Error: failed to modify connection.secondaries: the value 'a\' is not a valid UUID. After: $ nmcli --offline connection add type ethernet con-name x connection.secondaries 'a\ b' Error: failed to modify connection.secondaries: the value 'a b' is not a valid UUID. https://bugzilla.redhat.com/show_bug.cgi?id=2177209 --- src/libnmc-setting/nm-meta-setting-desc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libnmc-setting/nm-meta-setting-desc.c b/src/libnmc-setting/nm-meta-setting-desc.c index b03d9ecdc2..4221399de2 100644 --- a/src/libnmc-setting/nm-meta-setting-desc.c +++ b/src/libnmc-setting/nm-meta-setting-desc.c @@ -5606,7 +5606,7 @@ static const NMMetaPropertyInfo *const property_infos_CONNECTION[] = { .remove_by_idx_fcn_u32 = MULTILIST_REMOVE_BY_IDX_FCN_U32 (NMSettingConnection, nm_setting_connection_remove_secondary), .remove_by_value_fcn = MULTILIST_REMOVE_BY_VALUE_FCN (NMSettingConnection, nm_setting_connection_remove_secondary_by_value), .validate2_fcn = _multilist_validate2_fcn_uuid, - .strsplit_plain = TRUE, + .strsplit_with_spaces = TRUE, ), ), ),