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
This commit is contained in:
parent
3dc07052a1
commit
438ec1c80d
@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user