diff --git a/xCAT-server/lib/xcat/plugins/lsslp.pm b/xCAT-server/lib/xcat/plugins/lsslp.pm index be9017276..9546d7ebd 100644 --- a/xCAT-server/lib/xcat/plugins/lsslp.pm +++ b/xCAT-server/lib/xcat/plugins/lsslp.pm @@ -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