mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-05-28 04:35:40 -04:00
check_ifstatus: Fix "-n" and "-u" options
Ignore interface if it's specified via "-n" OR "-u", not just when it's specified via "-n" AND "-u".
This commit is contained in:
parent
f40fc650f7
commit
83744b24b0
1 changed files with 1 additions and 1 deletions
|
|
@ -176,7 +176,7 @@ foreach $key (keys %ifStatus) {
|
|||
# skip unused interfaces
|
||||
my $ifName = $ifStatus{$key}{$snmpIfDescr};
|
||||
|
||||
if (!defined($ifStatus{$key}{'notInUse'}) || !grep(/^${ifName}/, @unused_ports )) {
|
||||
if (!defined($ifStatus{$key}{'notInUse'}) && !grep(/^${ifName}/, @unused_ports )) {
|
||||
# check only if interface is administratively up
|
||||
if ($ifStatus{$key}{$snmpIfAdminStatus} == 1 ) {
|
||||
#check only if interface is not excluded
|
||||
|
|
|
|||
Loading…
Reference in a new issue