diff options
| author | Jeremy Bicha <jeremy.bicha@canonical.com> | 2022-02-24 14:53:07 -0500 |
|---|---|---|
| committer | Jeremy Bicha <jeremy.bicha@canonical.com> | 2022-02-24 14:53:07 -0500 |
| commit | a62a36104338c17e7a957e13703c841a1dd5ceca (patch) | |
| tree | bbebe700ea2b47cf6b6b515ab2ab3cd980b23926 /src/nmcli/connections.c | |
| parent | 4d660d8947426e043acb5ff012b929c9ef538839 (diff) | |
| parent | 1b1ea5e7932eb8b9491beb22f69844697751f1ce (diff) | |
Merge tag 'debian/1.36.0-1' into ubuntu/master
network-manager Debian release 1.36.0-1
Diffstat (limited to 'src/nmcli/connections.c')
| -rw-r--r-- | src/nmcli/connections.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nmcli/connections.c b/src/nmcli/connections.c index 5a66b82f..559dc7db 100644 --- a/src/nmcli/connections.c +++ b/src/nmcli/connections.c @@ -4189,6 +4189,7 @@ set_option(NmCli *nmc, NMConnection *connection, const NMMetaAbstractInfo *abstract_info, const char *value, + gboolean allow_reset, GError **error) { const char *setting_name, *property_name, *option_name; @@ -4209,7 +4210,7 @@ set_option(NmCli *nmc, NULL); if (option && option->check_and_set) { return option->check_and_set(nmc, connection, option, value, error); - } else { + } else if (value || allow_reset) { set_property(nmc->client, connection, setting_name, @@ -5199,7 +5200,7 @@ nmc_process_connection_properties(NmCli *nmc, if (!*argc && nmc->complete) complete_option(nmc, chosen, value ?: "", connection); - if (!set_option(nmc, connection, chosen, value, error)) + if (!set_option(nmc, connection, chosen, value, TRUE, error)) return FALSE; } while (*argc); @@ -5410,7 +5411,7 @@ again: if (multi && !value) return; - if (!set_option(nmc, connection, abstract_info, value, &error)) { + if (!set_option(nmc, connection, abstract_info, value, FALSE, &error)) { g_printerr("%s\n", error->message); g_clear_error(&error); goto again; |