summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-04-12 12:10:33 +0200
committerThomas Haller <thaller@redhat.com>2019-04-17 11:11:21 +0200
commitd59f046bb62dc9b655a1c3f585ea8b06128fe07a (patch)
tree6e8bc7fbc5cda095934a2f4daf93ff84c699b0ef
parentb6d0be2d3b4caa30685abf46ae6a355cada8bf4e (diff)
downloadNetworkManager-d59f046bb62dc9b655a1c3f585ea8b06128fe07a.tar.gz
cli: use nm_utils_escaped_tokens_*() for handling policy routes
Optimally, all list types properties in nmcli support proper escaping. For that, we should use nm_utils_escaped_tokens_*() API. For now, just change that for policy routes. They were just added recently, so no change in behavior of released API.
-rw-r--r--clients/common/nm-meta-setting-desc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c
index aa2bcd4f6f..2a4e5b8269 100644
--- a/clients/common/nm-meta-setting-desc.c
+++ b/clients/common/nm-meta-setting-desc.c
@@ -3400,7 +3400,7 @@ _objlist_obj_to_str_fcn_ip_config_routing_rules (NMMetaAccessorGetType get_type,
NULL,
NULL);
if (s)
- g_string_append (str, s);
+ nm_utils_escaped_tokens_escape_gstr (s, ESCAPED_TOKENS_DELIMTERS, str);
}
static gboolean
@@ -5670,7 +5670,7 @@ static const NMMetaPropertyInfo *const property_infos_IP4_CONFIG[] = {
.obj_to_str_fcn = _objlist_obj_to_str_fcn_ip_config_routing_rules,
.set_fcn = _objlist_set_fcn_ip_config_routing_rules,
.remove_by_idx_fcn_u = OBJLIST_REMOVE_BY_IDX_FCN_U (NMSettingIPConfig, nm_setting_ip_config_remove_routing_rule),
- .strsplit_with_escape = TRUE,
+ .strsplit_escaped_tokens = TRUE,
),
),
),
@@ -5878,7 +5878,7 @@ static const NMMetaPropertyInfo *const property_infos_IP6_CONFIG[] = {
.obj_to_str_fcn = _objlist_obj_to_str_fcn_ip_config_routing_rules,
.set_fcn = _objlist_set_fcn_ip_config_routing_rules,
.remove_by_idx_fcn_u = OBJLIST_REMOVE_BY_IDX_FCN_U (NMSettingIPConfig, nm_setting_ip_config_remove_routing_rule),
- .strsplit_with_escape = TRUE,
+ .strsplit_escaped_tokens = TRUE,
),
),
),