mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-20 17:32:15 +00:00
8f0d4e5e84
process_request gated the MAC record on inet_aton($node), which answers for
IPv4 only, so a node whose only address is IPv6 was refused with "Can not
resolve IP for the matching node". update_discovery_data runs after that return,
so no discoverydata row was written, no mac was set and makedhcp never ran.
Measured on xcat88-mn: discoverydata empty after a full seq_discovery_ipv6 run.
It then matched each NIC behind a dotted-quad pattern. The Genesis image sends
address=${ipv4_address:-$ipv6_address}, so over IPv6 the NIC record carries the
v6 address, the branch was skipped, $localnic stayed 0 and the node was reported
as not on the deploy network.
The node is now resolved once with getipaddr and accepted by
discovery_address_usable, and the network of a NIC comes from nic_network_key,
which masks IPv6 by bits so a prefix that is not a whole number of bytes keys
correctly. An IPv6 NIC takes its hostname tag from hosttag_for_ipv6_nic:
gethosttag reads an A record and my_if_netmap, which is netstat -rn and prints
IPv4 routes only, so it cannot answer for one.
The IPv4 path is untouched. nic_network_key keeps the arithmetic the caller used,
gethosttag is still asked for an IPv4 NIC, and each test holds an IPv4 case down.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>