mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-04 20:17:55 +00:00
2b6337d67d
getipaddr answers from %::hostiphash before it resolves. The bypass tests OnlyV6 and GetAllAddresses and does not test OnlyV4, so a caller that asks for IPv4 is handed whatever the first lookup cached. An unrestricted lookup passes AF_UNSPEC to getaddrinfo, so on a dual-stack management node with an AAAA record it caches the IPv6 address. xcatd is long-lived and the hash is a global, so one earlier caller poisons every OnlyV4 caller after it. debian.pm then writes nfsroot=2001:db8::1:/install, which is not a parseable nfsroot, and the Subiquity install never mounts. dhcp.pm and mknb.pm hold four more OnlyV4 callers with the same exposure. The test also pins what the fix must not break: an IPv4 cache entry is still served to an OnlyV4 caller, and an unrestricted caller still gets its cache hit whatever family it holds. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>