summaryrefslogtreecommitdiffstats
path: root/plugins-scripts/t
diff options
context:
space:
mode:
Diffstat (limited to 'plugins-scripts/t')
0 files changed, 0 insertions, 0 deletions
diff --git a/plugins-scripts/check_ifstatus.pl b/plugins-scripts/check_ifstatus.pl
index 2263823..63c71ff 100755
--- a/plugins-scripts/check_ifstatus.pl
+++ b/plugins-scripts/check_ifstatus.pl
@@ -280,7 +280,7 @@ sub process_arguments() {
280 $status = GetOptions( 280 $status = GetOptions(
281 "V" => \$opt_V, "version" => \$opt_V, 281 "V" => \$opt_V, "version" => \$opt_V,
282 "h" => \$opt_h, "help" => \$opt_h, 282 "h" => \$opt_h, "help" => \$opt_h,
283 "v=i" => \$snmp_version, "snmp_version=i" => \$snmp_version, 283 "v=s" => \$snmp_version, "snmp_version=s" => \$snmp_version,
284 "C=s" => \$community,"community=s" => \$community, 284 "C=s" => \$community,"community=s" => \$community,
285 "L=s" => \$seclevel, "seclevel=s" => \$seclevel, 285 "L=s" => \$seclevel, "seclevel=s" => \$seclevel,
286 "a=s" => \$authproto, "authproto=s" => \$authproto, 286 "a=s" => \$authproto, "authproto=s" => \$authproto,
@@ -317,7 +317,10 @@ sub process_arguments() {
317 $timeout = $TIMEOUT; 317 $timeout = $TIMEOUT;
318 } 318 }
319 319
320 if ($snmp_version !~ /[123]/){ 320 # Net::SNMP wants an integer
321 $snmp_version = 2 if $snmp_version eq "2c";
322
323 if ($snmp_version !~ /^[123]$/){
321 $state='UNKNOWN'; 324 $state='UNKNOWN';
322 print ("$state: No support for SNMP v$snmp_version yet\n"); 325 print ("$state: No support for SNMP v$snmp_version yet\n");
323 exit $ERRORS{$state}; 326 exit $ERRORS{$state};