fix for bug 3976: check -i flag

This commit is contained in:
ligc 2014-03-14 16:15:16 -05:00
parent 9ae698fb70
commit 50fed0a17a

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 )) {