2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-21 09:52:17 +00:00
Files
xcat-core/xCAT-server
Daniel Hilst 8f95556ed5 fix(xcatd): the AF_INET retry for a v4-mapped peer cannot resolve
xcatd asks gethostbyaddr for AF_INET6 and retries with AF_INET when the first
lookup answers nothing. Both calls pass $conn->peeraddr. On a dual-stack
listener that is the 16-byte ::ffff:a.b.c.d for an IPv4 peer, and AF_INET
needs 4 bytes, so the retry is unreachable code. The install monitor then
discards the node's status update and no node reaches the booted state.

xCAT::NetworkUtils::unmap_v4mapped_addr returns the 4 IPv4 bytes of a mapped
address and returns anything else unchanged, so a real IPv6 address keeps all
16 bytes. The install monitor and the SSL listener pass the peer address
through it before the AF_INET retry.

networkutils_unmap_v4mapped.t covers both directions. Removing the mapped
branch fails only the mapped assertion; returning substr for every 16-byte
address fails only the two IPv6 assertions.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-26 15:27:23 -03:00
..