diff --git a/perl-xCAT/xCAT/DBobjUtils.pm b/perl-xCAT/xCAT/DBobjUtils.pm index b4c71b087..afcf20f21 100644 --- a/perl-xCAT/xCAT/DBobjUtils.pm +++ b/perl-xCAT/xCAT/DBobjUtils.pm @@ -1862,7 +1862,7 @@ sub getNetwkInfo chomp $NM; chomp $net; - if(xCAT::Utils->ishostinsubnet($IP, $NM, $net)) + if(xCAT::NetworkUtils->ishostinsubnet($IP, $NM, $net)) { # fill in the hash - foreach my $attr (@attrnames) { diff --git a/perl-xCAT/xCAT/NetworkUtils.pm b/perl-xCAT/xCAT/NetworkUtils.pm index 85541de85..7671b1f58 100755 --- a/perl-xCAT/xCAT/NetworkUtils.pm +++ b/perl-xCAT/xCAT/NetworkUtils.pm @@ -117,8 +117,8 @@ sub gethostname() { if ($socket6support) # the getaddrinfo and getnameinfo supports both IPv4 and IPv6 { - my ($family, $socket, $protocol, $ip, $name) = getaddrinfo($iporhost,0); - my $host = (getnameinfo($ip))[0]; + my ($family, $socket, $protocol, $ip, $name) = Socket6::getaddrinfo($iporhost,0); + my $host = (Socket6::getnameinfo($ip))[0]; if ($host eq $iporhost) # can not resolve { return undef; @@ -180,10 +180,10 @@ sub getipaddr() { if ($socket6support) # the getaddrinfo and getnameinfo supports both IPv4 and IPv6 { - my ($family, $socket, $protocol, $ip, $name) = getaddrinfo($iporhost,0); + my ($family, $socket, $protocol, $ip, $name) = Socket6::getaddrinfo($iporhost,0); if ($ip) { - return (getnameinfo($ip, NI_NUMERICHOST()))[0]; + return (Socket6::getnameinfo($ip, Socket6::NI_NUMERICHOST()))[0]; } return undef; }