mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-21 18:02:18 +00:00
be8afb0511
makedhcp answers "Error: Unable to resolve the tftpserver for node" for a node whose tftpserver or xcatmaster is an IPv6 address, and exits non-zero. Measured on an AlmaLinux 10.2 management node with tftpserver=2001:db8:7309::1: the DHCPv6 reservation and its bootfile-url were written correctly and makedhcp still reported the error. next_server_for_node reads both attributes with inet_aton, which cannot parse an IPv6 literal, and treats the failure as a misconfiguration. An IPv6 boot server is named in the DHCPv6 reservation rather than in a DHCPv4 next-server, so there is no DHCPv4 answer due and nothing to report. Both branches now return without a value when the attribute is an IPv6 address. A name that does not resolve is still reported, which is the behaviour the new assertions would otherwise be satisfied by removing. dhcp_kea_plugin_intent.t covers all three: removing either guard fails the matching "reports no error" assertion, and removing the error path fails the assertion that names the attribute. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>