NetworkManager/clients
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
..
cli cli: let _print_fill() hide option if NM_META_ACCESSOR_GET_OUT_FLAGS_HIDE is set 2020-04-20 08:54:55 +02:00
cloud-setup license: Add license using SPDX identifiers to meson build files 2020-02-17 13:16:57 +01:00
common cli: unset "ipv[46].never-default" when setting "ipv[46].gateway" 2020-04-22 21:06:24 +02:00
tests clients/trivial: remove obsolete comment from test-client.py howto 2020-04-09 14:10:56 +02:00
tui meson: merge branch 'inigomartinez/meson-license' 2020-03-28 12:45:19 +01:00
meson.build license: Add license using SPDX identifiers to meson build files 2020-02-17 13:16:57 +01:00
nm-online.c all: use nm_clear_pointer() instead of g_clear_pointer() 2020-03-23 11:22:38 +01:00