From b8eeb7bbdff0a486e6083080e7862229a3250ca7 Mon Sep 17 00:00:00 2001 From: ligc Date: Mon, 10 May 2010 09:21:56 +0000 Subject: [PATCH] ipv6 fix, replace the Socket library calls with NetworkUtils subroutines git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6046 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/updatenode.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/updatenode.pm b/xCAT-server/lib/xcat/plugins/updatenode.pm index 5324791a6..ec36309e7 100644 --- a/xCAT-server/lib/xcat/plugins/updatenode.pm +++ b/xCAT-server/lib/xcat/plugins/updatenode.pm @@ -13,6 +13,7 @@ use xCAT::Table; use xCAT::Schema; use Data::Dumper; use xCAT::Utils; +use xCAT::NetworkUtils; use xCAT::InstUtils; use Getopt::Long; use xCAT::GlobalDef; @@ -1249,7 +1250,7 @@ sub doAIXcopy # want list of remote service nodes - to copy files to # get the ip of the NIM primary (normally the management node) - my $ip = inet_ntoa(inet_aton($nimprime)); + my $ip = xCAT::NetworkUtils->getipaddr($nimprime); chomp $ip; my ($p1, $p2, $p3, $p4) = split /\./, $ip; @@ -1257,10 +1258,9 @@ sub doAIXcopy foreach my $snkey (keys %$sn) { - my $ip = inet_ntoa(inet_aton($snkey)); + my $sip = xCAT::NetworkUtils->getipaddr($snkey); chomp $ip; - my ($s1, $s2, $s3, $s4) = split /\./, $ip; - if (($s1 == $p1) && ($s2 == $p2) && ($s3 == $p3) && ($s4 == $p4)) + if ($ip eq $sip) { next; }