fix bug 3373285:lsslp not find hmc with -i option

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10137 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
yinle 2011-07-21 08:23:52 +00:00
parent 7529e736f3
commit cd416951e1

View File

@ -1910,14 +1910,22 @@ sub getip_from_iplist
my $inc = shift;
my @ips = split /,/, $iplist;
my @ips2 = split /,/, $inc;
if ( $inc)
{
for my $net (keys %$nets)
{
delete $nets->{$net} if ( $nets->{$net} ne $inc);
my $flag = 1;
for my $einc (@ips2) {
if ( $nets->{$net} eq $einc) {
$flag = 0;
}
}
delete $nets->{$net} if ($flag) ;
}
}
for my $ip (@ips)
{
next if ( $ip =~ /:/); #skip IPV6 addresses