mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 15:10:09 +01:00
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:2f45665559https://bugzilla.redhat.com/show_bug.cgi?id=1380165 (cherry picked from commit984d4f0684)
This commit is contained in:
parent
7bf10b4cca
commit
11e3c88295
1 changed files with 4 additions and 2 deletions
|
|
@ -4149,7 +4149,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
|
||||
|
|
@ -4168,7 +4169,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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue