NetworkManager/clients
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
..
cli nmcli: remove interface length check in nmcli 2020-02-17 17:25:52 +01:00
cloud-setup all: remove wrong CURL option initialization 2020-02-03 15:31:18 +01:00
common cli: unset "ipv[46].never-default" when setting "ipv[46].gateway" 2020-04-22 21:06:44 +02:00
tests libnm,cli,ifcfg-rh: add ipv6.ra-timeout configuration option 2020-02-17 15:06:10 +01:00
tui all: use nm_utils_ifname_valid_kernel() instead of nm_utils_is_valid_iface_name() 2020-02-17 17:28:14 +01:00
meson.build cloud-setup: add tool for automatic IP configuration in cloud 2019-11-28 19:52:18 +01:00
nm-online.c all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00