NetworkManager/clients/common
Thomas Haller 7ef4185714 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)
(cherry picked from commit d2606cc49e)
2020-04-22 21:16:03 +02:00
..
tests all: drop empty first line from sources 2019-06-11 10:15:06 +02:00
meson.build shared: build helper "libnm-libnm-core-{intern|aux}.la" library for libnm-core 2019-04-18 20:07:44 +02:00
nm-client-utils.c cli: don't treat empty string as valid number in nmc_string_to_uint_base() 2019-03-25 09:12:32 +01:00
nm-client-utils.h shared: build helper "libnm-libnm-core-{intern|aux}.la" library for libnm-core 2019-04-18 20:07:44 +02:00
nm-meta-setting-access.c cli: allow completing filenames 2019-05-06 10:10:00 +02:00
nm-meta-setting-access.h cli: allow completing filenames 2019-05-06 10:10:00 +02:00
nm-meta-setting-desc.c cli: unset "ipv[46].never-default" when setting "ipv[46].gateway" 2020-04-22 21:16:03 +02:00
nm-meta-setting-desc.h clients: add missing 'extern' keyword 2020-04-20 09:12:55 +02:00
nm-polkit-listener.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-polkit-listener.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-secret-agent-simple.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-secret-agent-simple.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
nm-vpn-helpers.c ipv6: add 'disabled' method 2019-06-11 16:22:04 +02:00
nm-vpn-helpers.h all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00
settings-docs.h.in cli: unset "ipv[46].never-default" when setting "ipv[46].gateway" 2020-04-22 21:16:03 +02:00
settings-docs.xsl cli: fix marking settings docs for translation 2017-04-23 23:45:02 +02:00