2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-12-04 08:07:04 +00:00
Files
xcat-core/xCAT-genesis-scripts/usr/bin
Daniel Hilst 1ea3ddc8d5 fix(xcat-core): bmcsetup compares BMC addresses as text
An OpenBMC node can report "failed" after its IPv6 address is set
correctly, and "bmcready" when the BMC has a different address.

bmc_has_address in bmcsetup searches the whole lan6 print output for
the configured text. One IPv6 address has many spellings, so
"2001:0db8:0001::0020" does not match "2001:db8:1::20". A substring
match also accepts "2001:db8:1::20" for "2001:db8:1::2". The IPv4 check
has the same substring defect.

bmc_has_address now reads each "Address:" entry of lan6 print and
compares it with the configured address after ipv6_expand writes both
as eight zero-padded lowercase groups without the prefix length.
ipv6_expand uses only bash. The IPv4 check compares the complete
"IP Address" field.

The new tests in genesis_bmcsetup_users.bats fail without this change.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-11 15:46:57 -03:00
..
2024-05-07 16:31:30 +02:00