2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-19 17:02:15 +00:00
Commit Graph

1 Commits

Author SHA1 Message Date
Daniel Hilst 7514b931b3 fix(xnba): an IPv6 node loses the server from every URL in its iPXE script
xnba.pm writes ${next-server} in place of !myipfn! and lets iPXE fill it from
the DHCP offer. next-server is a DHCPv4 field, so an IPv6 node resolves it to
the empty string and every URL in the script loses its host. The fallback does
not help either: my_ip_facing resolves with inet_aton, so it reports an
IPv6-only node unresolvable.

The script now carries the facing address of the management node when the node
has an IPv6 address, bracketed because the script puts it in a URL. The lookup
names the family, the way grub2.pm does. An IPv4 node keeps ${next-server}, so
nothing changes for it.

ipxe.pm runs this code with SCRIPTS and METHOD set to its own, so the change
reaches netboot=ipxe as well as netboot=xnba.

xnba.pm also calls xCAT::NetworkUtils eight times without loading it, and works
only because another module does. The use is now explicit.

Captured by xCAT-test/unit/ipxe_script_server.t. Ignoring the family fails five
of its seven assertions and leaves the two IPv4 ones passing.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-29 16:59:24 -03:00