fix for bug 3976: check -i flag

This commit is contained in:
ligc 2014-03-14 16:16:27 -05:00
parent 46132889d8
commit 2ad92ce054

2
xCAT-server/lib/xcat/plugins/lsslp.pm Normal file → Executable file
View File

@ -368,7 +368,7 @@ sub parse_args {
###################################
my (@octets) = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;
if ( scalar(@octets) != 4 ) {
return( [1,"Invalid IP address: $ip"] );
return( usage("Invalid IP address: $ip") );
}
foreach my $octet ( @octets ) {
if (( $octet < 0 ) or ( $octet > 255 )) {