NetworkManager/clients/cloud-setup
Thomas Haller 2e4b73c7fe cloud-setup: skip configuring policy routing if there is only one interface/address
nm-cloud-setup automatically configures the network. That may conflict
with what the user wants. In case the user configures some specific
setup, they are encouraged to disable nm-cloud-setup (and its
automatism).

Still, what we do by default matters, and should play as well with
user's expectations. Configuring policy routing and a higher priority
table (30400+) that hijacks the traffic can cause problems.

If the system only has one IPv4 address and one interface, then there
is no point in configuring policy routing at all. Detect that, and skip
the change in that case.

Note that of course we need to handle the case where previously multiple
IP addresses were configured and an update gives only one address. In
that case we need to clear the previously configured rules/routes. The
patch achieves this.

(cherry picked from commit 5f047968d7)
(cherry picked from commit 8bc8a0f56b)
2021-10-05 09:35:48 +02:00
..
tests cloud-setup/tests: add test for nmcs_setting_ip_replace_ipv4_addresses() 2021-02-10 18:35:13 +01:00
90-nm-cloud-setup.sh cloud-setup: let dispatcher script run tool only if service is enabled 2019-12-03 16:18:33 +01:00
main.c cloud-setup: skip configuring policy routing if there is only one interface/address 2021-10-05 09:35:48 +02:00
meson.build cloud-setup/tests: add unit test for nm-cloud-setup 2021-02-10 18:23:44 +01:00
nm-cloud-setup-utils.c cloud-setup: fix replacing IPv4 addresses during update 2021-02-10 18:23:44 +01:00
nm-cloud-setup-utils.h cloud-setup: add nmcs_utils_ipaddr_normalize*() helper 2021-01-08 16:32:49 +01:00
nm-cloud-setup.service.in cloud-setup: add Documentation link to "nm-cloud-setup.service" 2021-02-02 18:13:02 +01:00
nm-cloud-setup.timer cloud-setup: add tool for automatic IP configuration in cloud 2019-11-28 19:52:18 +01:00
nm-http-client.c all: add "libnm/nm-default-client.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
nm-http-client.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nmcs-provider-azure.c all: add "libnm/nm-default-client.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
nmcs-provider-azure.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nmcs-provider-ec2.c all: add "libnm/nm-default-client.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
nmcs-provider-ec2.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nmcs-provider-gcp.c all: add "libnm/nm-default-client.h" as replacement for "nm-default.h" 2021-02-09 12:38:17 +01:00
nmcs-provider-gcp.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nmcs-provider.c cloud-setup: count numbers of valid IPv4 addresses in get-config result 2021-10-05 09:35:48 +02:00
nmcs-provider.h cloud-setup: count numbers of valid IPv4 addresses in get-config result 2021-10-05 09:35:48 +02:00