mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-19 06:30:43 +01:00
cli: allow resetting the connection.master to NULL
Without this patch, the following two commands fail: nmcli connection modify em1 connection.master nmcli connection modify em1 connection.master "" Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
93e4e0f8a1
commit
8a67713e9e
1 changed files with 6 additions and 2 deletions
|
|
@ -2372,8 +2372,12 @@ nmc_property_con_set_master (NMSetting *setting, const char *prop, const char *v
|
|||
{
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
|
||||
|
||||
if ( !nm_utils_iface_valid_name (val)
|
||||
&& !nm_utils_is_uuid (val)) {
|
||||
if (!val)
|
||||
;
|
||||
else if (!*val)
|
||||
val = NULL;
|
||||
else if ( !nm_utils_iface_valid_name (val)
|
||||
&& !nm_utils_is_uuid (val)) {
|
||||
g_set_error (error, 1, 0,
|
||||
_("'%s' is not valid master; use ifname or connection UUID"),
|
||||
val);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue