fix: Check for ifHCInOctets and ifHighSpeed before falling back to if… (#6777)

* fix: Check for ifHCInOctets and ifHighSpeed before falling back to ifEntry

* switched && to ||
This commit is contained in:
Neil Lathwood
2017-06-10 12:50:40 +01:00
committed by Tony Murray
parent a075997539
commit 3bf7e207a7

View File

@@ -199,7 +199,8 @@ if ($device['os'] === 'f5' && (version_compare($device['version'], '11.2.0', '>=
$port_stats = snmpwalk_cache_oid($device, 'ifXEntry', $port_stats, 'IF-MIB');
}
$hc_test = array_slice($port_stats, 0, 1);
if (!isset($hc_test[0]['ifHCInOctets']) && !is_numeric($hc_test[0]['ifHCInOctets'])) {
if ((!isset($hc_test[0]['ifHCInOctets']) && !is_numeric($hc_test[0]['ifHCInOctets'])) ||
((!isset($hc_test[0]['ifHighSpeed']) && !is_numeric($hc_test[0]['ifHighSpeed'])))) {
$port_stats = snmpwalk_cache_oid($device, 'ifEntry', $port_stats, 'IF-MIB', null, '-OQUst');
} else {
foreach ($ifmib_oids as $oid) {