NetworkManager/clients
Thomas Haller 2186c9934f 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)
(cherry picked from commit 7ef4185714)
2020-04-22 21:40:22 +02:00
..
cli cli: fix crash on autocompletion 2019-06-20 10:43:58 +02:00
common cli: unset "ipv[46].never-default" when setting "ipv[46].gateway" 2020-04-22 21:40:22 +02:00
tests clients/tests: don't include the source line number with client tests output 2020-04-20 17:48:05 +02:00
tui tui: add only some options to new bond connections 2019-06-11 18:36:30 +02:00
meson.build build/meson: rename "nm_core_dep" to "libnm_core_dep" 2019-04-18 20:13:49 +02:00
nm-online.c nm-online: sort options in man page and program help 2018-11-05 09:32:20 +01:00