From 7aeb540e5ad44aff38aebc1710a23cbf3395d318 Mon Sep 17 00:00:00 2001 From: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com> Date: Wed, 21 Aug 2024 08:26:48 +0200 Subject: [PATCH] Bug - VRP - fix OutOfRange QueryException + missing key (#16290) * fix OutOfRange QueryException * move up * missing key * another * another --- LibreNMS/OS/Vrp.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/LibreNMS/OS/Vrp.php b/LibreNMS/OS/Vrp.php index 3e6ccc220e..77bd961375 100644 --- a/LibreNMS/OS/Vrp.php +++ b/LibreNMS/OS/Vrp.php @@ -212,6 +212,7 @@ class Vrp extends OS implements $txpow = $radio['hwWlanRadioActualEIRP'] ?? 0; $interference = $radio['hwWlanRadioChInterferenceRate'] ?? 0; $radioutil = $radio['hwWlanRadioChUtilizationRate'] ?? 0; + $radioutil = ($radioutil > 100 || $radioutil < 0) ? -1 : $radioutil; $numasoclients = $clientPerRadio[$ap_id][$r_id] ?? 0; $radio['hwWlanRadioType'] = $radio['hwWlanRadioType'] ?? 0; @@ -385,6 +386,9 @@ class Vrp extends OS implements // update the DB foreach ($portAuthSessionEntry as $authId => $portAuthSessionEntryParameters) { + if (! array_key_exists('hwAccessInterface', $portAuthSessionEntryParameters) || ! array_key_exists('hwAccessMACAddress', $portAuthSessionEntryParameters)) { + continue; + } $mac_address = strtolower(implode(array_map('zeropad', explode(':', $portAuthSessionEntryParameters['hwAccessMACAddress'])))); $port_id = $ifName_map->get($portAuthSessionEntryParameters['hwAccessInterface'], 0); if ($port_id <= 0) {