From b6718793939eea1f0681ecfaa6f564187b04605c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Mon, 31 Aug 2026 20:10:17 -0300 Subject: [PATCH] fix(anaconda): resolve image and master addresses only for hostnames --- xCAT-server/lib/xcat/plugins/anaconda.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 9107f26ed..08f24c2d0 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -680,7 +680,7 @@ sub mknetboot } my $imgsrvip; - unless($imgsrv eq '!myipfn!' or xCAT::NetworkUtils->validate_ip($imgsrv)==0){ + unless ($imgsrv eq '!myipfn!' or xCAT::NetworkUtils->isValidIp($imgsrv)) { # if imgsrv is hostname, convert it to ip address # the host name might not be resolved inside initrd $imgsrvip = xCAT::NetworkUtils->getipaddr($imgsrv); @@ -690,7 +690,7 @@ sub mknetboot } my $xcatmasterip; - if (xCAT::NetworkUtils->validate_ip($xcatmaster)) { + unless (xCAT::NetworkUtils->isValidIp($xcatmaster)) { # if xcatmaster is hostname, convert it to ip address # the host name might not be resolved inside initrd $xcatmasterip = xCAT::NetworkUtils->getipaddr($xcatmaster);