diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2016-09-28 22:39:09 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2016-10-04 14:18:27 +0200 |
commit | 984d4f068456390352ab16416a55e835027ba66e (patch) | |
tree | 639ddb876ef6f1ad0a9137aa7c670519a3d4848e /clients | |
parent | 6e9abe3d88148b92978400c5155c48ec29372f2e (diff) | |
download | NetworkManager-984d4f068456390352ab16416a55e835027ba66e.tar.gz |
cli: properly set multiple addresses in questionnaire mode
Pass the '+' modifier to set_property() for IPv4 and IPv6 addresses to
append the new address to existing ones instead of overwriting them.
Fixes: 2f456655593e92385a7e736691e7691514740805
https://bugzilla.redhat.com/show_bug.cgi?id=1380165
Diffstat (limited to 'clients')
-rw-r--r-- | clients/cli/connections.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c index 61350da395..f99449ffd2 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -4156,7 +4156,8 @@ set_ip4_address (NmCli *nmc, NMConnection *con, OptionInfo *option, const char * NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_MANUAL, NULL); } - return set_property (con, option->setting_name, option->property, value, '\0', error); + return set_property (con, option->setting_name, option->property, value, + option->flags & OPTION_MULTI ? '+' : '\0', error); } static gboolean @@ -4175,7 +4176,8 @@ set_ip6_address (NmCli *nmc, NMConnection *con, OptionInfo *option, const char * NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_MANUAL, NULL); } - return set_property (con, option->setting_name, option->property, value, '\0', error); + return set_property (con, option->setting_name, option->property, value, + option->flags & OPTION_MULTI ? '+' : '\0', error); } |