makedhcp_dhcpv6_boot_intent declares a node with no tftpserver, so it measures only the
<xcatmaster> path. A dual-stack node keeps an IPv4 tftpserver, and that is the path on which
makedhcp exited 1 and dropped the boot URL.
makedhcp_dhcpv6_dual_stack_boot_server declares a grub2 node with an IPv6 address and an IPv4
tftpserver, then asserts that makedhcp exits 0, that Kea accepts the configuration, and that the
bootfile-url names the IPv6 address of the management node facing the node. Both values are
compared exactly, so a dropped option and a wrong authority each fail.
The test addresses move to the documentation ranges at the same time. The three networkutils
tests carried a link-local address read off a lab NIC, and dhcp_kea_plugin_intent.t carried two
addresses from the management network. They are fixtures that nothing dials, so this only keeps
the internal topology out of the upstream tree.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
getipaddr reaches the resolver through Socket6 when that module is present and
through core Socket otherwise, and only the core path ordered its results. A
management node with Socket6 installed therefore still answered
fe80::4054:ff:fec9:9ad2%mgmt0 for its own name, which is what xcatconfig wrote
into site.master. Measured on an AlmaLinux 10.2 node with perl-Socket6: the
previous commit was installed and getipaddr returned the link-local address
unchanged.
_socket6_addrinfo_routable_first reorders the flat five-element records
Socket6::getaddrinfo answers, by the same rule the core path uses. A list whose
length is not a whole number of records is returned untouched.
networkutils_linklocal_preference.t covers the record reorder with a stubbed
Socket6::getnameinfo. Making the link-local test constant false fails 2 of its
assertions. The call site itself has no unit test; the cluster run is what
shows site.master routable.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
On an EL10 management node whose own name resolves to both families,
xcatconfig writes a link-local IPv6 address into site.master and
site.nameservers. Measured on an AlmaLinux 10.2 node: getent reports
fe80::4054:ff:fec9:9ad2%2 before 192.168.201.154, and
xCAT::NetworkUtils->getipaddr($hostname) answers
fe80::4054:ff:fec9:9ad2%mgmt0, which xcatconfig stores. A node on another link
cannot reach that address, and the %zone form is not a literal isIpv6addr or
any consumer of site.master accepts.
getipaddr resolves through Socket::getaddrinfo with AF_UNSPEC when no family is
asked for, and returned the first entry getaddrinfo gave. prefer_routable_addresses
orders address literals so a routable one comes before a link-local one and
removes the zone identifier, and _addrinfo_routable_first applies the same order
to the getaddrinfo entries before getipaddr reads the first. A link-local
address is still returned when the host has no other.
networkutils_linklocal_preference.t covers the order, the zone identifier and
both link-local ranges. Removing the routable split fails 4 of its 10
assertions, removing the zone strip fails 3, and treating 169.254.0.0/16 as
routable fails 1.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>