From 3bf7e207a7d7880518127c8d0aa186482dcdb101 Mon Sep 17 00:00:00 2001 From: Neil Lathwood Date: Sat, 10 Jun 2017 12:50:40 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20Check=20for=20ifHCInOctets=20and=20ifHig?= =?UTF-8?q?hSpeed=20before=20falling=20back=20to=20if=E2=80=A6=20(#6777)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: Check for ifHCInOctets and ifHighSpeed before falling back to ifEntry * switched && to || --- includes/polling/ports.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/polling/ports.inc.php b/includes/polling/ports.inc.php index 0ca8024e6b..5f4b8b87ee 100644 --- a/includes/polling/ports.inc.php +++ b/includes/polling/ports.inc.php @@ -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) {