NetworkManager/clients/common
Thomas Haller d2606cc49e 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)
(cherry picked from commit fae37528d9)
2020-04-22 21:06:44 +02:00
..
tests all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
meson.build meson: Improve the client common build file 2019-10-01 09:49:33 +02:00
nm-client-utils.c clients: draw border around qr code on linux console 2019-11-05 16:32:20 +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:44 +02:00
nm-meta-setting-desc.h clients: add missing 'extern' keyword 2020-02-03 15:31:31 +01:00
nm-polkit-listener.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-polkit-listener.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-secret-agent-simple.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02: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 all: use nm_utils_ifname_valid_kernel() instead of nm_utils_is_valid_iface_name() 2020-02-17 17:28:14 +01: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:44 +02:00
settings-docs.xsl cli: fix marking settings docs for translation 2017-04-23 23:45:02 +02:00