NetworkManager/clients
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
..
cli all: fix wrong "gs_free GError *" declarations 2019-12-16 17:46:59 +01:00
common cli: unset "ipv[46].never-default" when setting "ipv[46].gateway" 2020-04-22 21:16:03 +02:00
tests clients/tests: fix expected client test output 2019-09-27 17:22:00 +02:00
tui tui: wifi: support WPA3-Personal (SAE) 2019-09-20 13:23:47 +02:00
meson.build build/meson: rename "nm_core_dep" to "libnm_core_dep" 2019-04-18 18:59:09 +02:00
nm-online.c all: drop emacs file variables from source files 2019-06-11 10:04:00 +02:00