From 438ec1c80ded389b4b5082bef84b70a469a99dbb Mon Sep 17 00:00:00 2001 From: ligc Date: Mon, 31 May 2010 08:20:33 +0000 Subject: [PATCH] IPv6 fix: validate ip address git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6274 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/PPCmac.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/perl-xCAT/xCAT/PPCmac.pm b/perl-xCAT/xCAT/PPCmac.pm index dc7794d70..4678577c7 100644 --- a/perl-xCAT/xCAT/PPCmac.pm +++ b/perl-xCAT/xCAT/PPCmac.pm @@ -137,6 +137,10 @@ sub parse_args { #get the network "fe80::" my $tmpll = "fe80::1"; %client_nethash = xCAT::DBobjUtils->getNetwkInfo( [$tmpll] ); + if (defined $client_nethash{$tmpll}) + { + $client_nethash{@$node[0]} = $client_nethash{$tmpll}; + } } else { return( [RC_ERROR,"Cannot get network information for node"] ); } @@ -154,6 +158,12 @@ sub parse_args { if ( $client_ip ) { $opt{C} = $client_ip; push @network, $client_ip; + } else { + if ($opt{S} =~ /:/) { + # set the IPv6 loopback address, lpar_netboot will handle it + $opt{C} = "::1"; + push @network, "::1"; + } } }