2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-28 05:12:14 +00:00
Files
xcat-core/xCAT-server/lib/xcat/plugins
Daniel Hilst ec5acc96a1 fix(yaboot): a dual-stack node is linked to a boot configuration name no firmware asks for
yaboot links its configuration file to one name for each address of the node
in the mac table. The name is sprintf("%02x%02x%02x%02x", split(/\./, $ip)),
and an IPv6 address has no four octets: sprintf reads the first field as a
number and fills the rest with zeroes, so 2001:db8:156::10 gives 7d1000000.
A dual-stack node therefore got one correct link and one link to a name no
firmware requests, with no warning. An IPv6-only node got only the second.

yaboot_config_name returns a name only for an address with four octets in
range, and the loop passes over anything else. A node that produced no name
at all is reported with what to use instead, rather than reporting success.

The facing address was found with my_ip_facing, which resolves with inet_aton
and reports an IPv6-only node unresolvable. yaboot_facing_address asks
node_address_family first, the way grub2.pm and petitboot.pm do, and the
!myipfn! substitution goes through substitute_facing_address so a placeholder
that a port follows is bracketed.

The error for a node with no facing address and no service node interpolated
$myname, which is declared in the branch above it and not in that one. The
file has no "use strict", so the message read ": " and the name of the
management node was lost. It now determines the name where it uses it.

yaboot_ipv6.t covers both subs. Restoring the unguarded sprintf fails the
four name checks; calling my_ip_facing unconditionally fails the three family
checks. The IPv4 checks pass under both, which is what tells the two defects
apart from a test that dies.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-30 10:23:38 -03:00
..
…
…
…
…
2024-05-07 16:19:25 +02:00
2024-05-07 16:19:25 +02:00
…
…
2024-05-07 16:19:25 +02:00
…
2026-10-19 16:11:59 -03:00
…
2023-01-18 11:00:59 -05:00
…
…
…
…
…
…
2018-08-21 15:18:12 -04:00
…
2018-08-21 15:18:12 -04:00