NetworkManager/clients/cloud-setup
Thomas Haller 5d112092bc cloud-setup/azure: fix detecting the gateway address
The code never set "iface_get_config->cidr_addr", despite
setting "cidr_prefix" and "has_cidr". As a result, cloud-setup
would think that the subnet is "0.0.0.0/$PLEN", and calculate
the gateway as "0.0.0.1".

As a result it would add a default route to table 30400 via 0.0.0.1,
which is obviously wrong.

How to detect the right gateway? Let's try obtain the subnet also via
the meta data. That seems mostly correct, except that we only access
subnet at index 0. What if there are multiple ones? I don't know.

https://bugzilla.redhat.com/show_bug.cgi?id=1912236
(cherry picked from commit c2629f72b0)
2021-10-14 13:02:00 -03: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: use suppress_prefixlength rule to honor non-default-routes in the main table 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 cloud-setup/azure: fix detecting the gateway address 2021-10-14 13:02:00 -03:00
nmcs-provider-azure.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nmcs-provider-ec2.c cloud-setup: add "hwaddr" to NMCSProviderGetConfigIfaceData struct 2021-10-05 09:35:48 +02:00
nmcs-provider-ec2.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nmcs-provider-gcp.c cloud-setup: add "hwaddr" to NMCSProviderGetConfigIfaceData struct 2021-10-05 09:35:48 +02:00
nmcs-provider-gcp.h all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nmcs-provider.c cloud-setup: track sorted list of NMCSProviderGetConfigIfaceData 2021-10-05 09:35:48 +02:00
nmcs-provider.h aliyun: reuse ipv4 gateway address returned by metadata server 2021-10-05 09:35:48 +02:00