NetworkManager/clients/common
Thomas Haller fae37528d9 cli: unset "ipv[46].never-default" when setting "ipv[46].gateway"
Since commit c1907a218a ('libnm-core: remove gateway when
never-default=yes in NMSettingIPConfig'), the gateway gets normalized
away when the profile has never-default set.

That means,

  $ nmcli connection modify "$PROFILE" ipv4.never-default yes ipv4.gateway 192.168.77.1

does not set the gateway. Likewise, if your profile has already never-default
enabled,

  $ nmcli connection modify "$PROFILE" ipv4.gateway 192.168.77.1

will have no effect. That is confusing and undesirable.

Note that we don't adjust the GObject property setter for "gateway" to clear
never-default. I feel, setting one property in libnm should preferably
not unset another (there are exceptions to the rule, like for team
properties). However, for nmcli it's clear in which order properties
are set, so this change is right for the client tool.

https://bugzilla.redhat.com/show_bug.cgi?id=1785039

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/475
(cherry picked from commit 411255d51f)
2020-04-22 21:06:24 +02:00
..
tests clients: set routing search domain with nameservers when importing WireGuard profile 2020-04-08 12:33:56 +02:00
meson.build license: Add license using SPDX identifiers to meson build files 2020-02-17 13:16:57 +01:00
nm-client-utils.c clients: avoid compiler warning about redefining NDEBUG for qrcodegen 2020-01-15 22:25:21 +01:00
nm-client-utils.h cli: add "nmcli d wifi show" 2019-10-18 17:38:57 +02:00
nm-meta-setting-access.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-meta-setting-access.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-meta-setting-desc.c cli: unset "ipv[46].never-default" when setting "ipv[46].gateway" 2020-04-22 21:06:24 +02:00
nm-meta-setting-desc.h clients: allow properties to be hidden if they have the default value 2020-04-20 08:54:55 +02:00
nm-polkit-listener.c cli/polkit: make parsing polkit-agent-helper-1 protocol more conforming 2020-04-10 10:44:57 +02:00
nm-polkit-listener.h cli/polkit: rename NM_POLKIT_LISTENER_SIGNAL_REQUEST signal to "request-sync" 2020-04-10 10:44:52 +02:00
nm-secret-agent-simple.c clients/secret-agent: don't require secrets for OWE connections 2019-12-05 14:00:10 +01:00
nm-secret-agent-simple.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-vpn-helpers.c clients: set ipv4.dns-priority to a exclusive value (-10) when importing WireGuard profiles 2020-04-08 13:47:26 +02:00
nm-vpn-helpers.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
qrcodegen.c cli: add "nmcli d wifi show" 2019-10-18 17:38:57 +02:00
qrcodegen.h cli: add "nmcli d wifi show" 2019-10-18 17:38:57 +02:00
settings-docs.h.in cli: unset "ipv[46].never-default" when setting "ipv[46].gateway" 2020-04-22 21:06:24 +02:00
settings-docs.xsl cli: fix marking settings docs for translation 2017-04-23 23:45:02 +02:00