summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2021-04-20 10:52:04 +0200
committerThomas Haller <thaller@redhat.com>2021-04-20 17:46:05 +0200
commitc2629f72b0e6b438bf3f2b93967f58c9defafea6 (patch)
tree738c4eaca3c07fae1437baed9a45e83c89a0da51 /man
parent889498c12cc5cd4ab718cbc8adbccc1f197adda5 (diff)
downloadNetworkManager-c2629f72b0e6b438bf3f2b93967f58c9defafea6.tar.gz
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
Diffstat (limited to 'man')
-rw-r--r--man/nm-cloud-setup.xml4
1 files changed, 3 insertions, 1 deletions
diff --git a/man/nm-cloud-setup.xml b/man/nm-cloud-setup.xml
index 388ef3ba91..5657c7fcc7 100644
--- a/man/nm-cloud-setup.xml
+++ b/man/nm-cloud-setup.xml
@@ -317,7 +317,9 @@
<listitem>
<para>Then, for each IP address index fetch the address at
<literal>http://169.254.169.254/metadata/instance/network/interface/$IFACE_INDEX/ipv4/ipAddress/$ADDR_INDEX/privateIpAddress?format=text&amp;api-version=2017-04-02</literal>.
- Also fetch the size of the subnet (the netmask) for the interface from
+ Also fetch the size of the subnet and prefix for the interface from
+ <literal>http://169.254.169.254/metadata/instance/network/interface/$IFACE_INDEX/ipv4/subnet/0/address/?format=text&amp;api-version=2017-04-02</literal>.
+ and
<literal>http://169.254.169.254/metadata/instance/network/interface/$IFACE_INDEX/ipv4/subnet/0/prefix/?format=text&amp;api-version=2017-04-02</literal>.
</para>
</listitem>