From c2b0a6ed80d171ed96d50a43a09db0d7ef2987e2 Mon Sep 17 00:00:00 2001 From: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com> Date: Tue, 24 Jan 2023 18:15:59 +0100 Subject: [PATCH] Extend filtering of graphs device_bits on cisco ASA (#14796) * Extend filtering for device_bits for cisco ASA * Style --- includes/html/graphs/device/bits.inc.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/html/graphs/device/bits.inc.php b/includes/html/graphs/device/bits.inc.php index c0ba539e8a..68d0b04a14 100644 --- a/includes/html/graphs/device/bits.inc.php +++ b/includes/html/graphs/device/bits.inc.php @@ -15,10 +15,11 @@ foreach ($ports as $port) { $ignore = 0; if (is_array(\LibreNMS\Config::get('device_traffic_iftype'))) { foreach (\LibreNMS\Config::get('device_traffic_iftype') as $iftype) { - if ($iftype == '/l2vlan/' && $device['os'] == 'asa') { - // ASA (at least in multicontext) reports all interfaces as l2vlan even if they are l3 - // so every context has no graph displayed unless l2vlan are accepted for all. - // This patch will ignore l2vlan for ASA. + if (in_array($iftype, ['/virtual/', '/l2vlan/']) && $device['os'] == 'asa') { + // ASA (at least in multicontext) reports interfaces as l2vlan even if they are l3 + // or propVirtual in 9.16 (like etherchannels) but without the physical ones. + // Filtering those types results in empty device_bits graphs in ASAs. + // This patch will avoid filtering l2vlan and propVirtual on ASA devices. continue; } if (preg_match($iftype . 'i', $port['ifType'])) {