From e19861c770c66d03a6e7e96dbea34b8f2c3cadf4 Mon Sep 17 00:00:00 2001 From: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com> Date: Fri, 12 Apr 2024 03:59:05 +0200 Subject: [PATCH] bug - Cisco NAC key error (#15934) * fix https://github.com/librenms/librenms/issues/15933 fixing https://github.com/librenms/librenms/issues/15933 * nullables are now null --- LibreNMS/OS/Shared/Cisco.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/LibreNMS/OS/Shared/Cisco.php b/LibreNMS/OS/Shared/Cisco.php index 75359790fd9b..dd16bf78dda1 100755 --- a/LibreNMS/OS/Shared/Cisco.php +++ b/LibreNMS/OS/Shared/Cisco.php @@ -396,15 +396,15 @@ public function pollNac() 'port_id' => $ifIndex_map->get($ifIndex, 0), 'mac_address' => $mac_address, 'auth_id' => $auth_id, - 'domain' => $portAuthSessionEntryParameters['cafSessionDomain'], - 'username' => $portAuthSessionEntryParameters['cafSessionAuthUserName'], - 'ip_address' => (string) IP::fromHexString($portAuthSessionEntryParameters['cafSessionClientAddress'], true), - 'host_mode' => $portAuthSessionEntryParameters['cafSessionAuthHostMode'], - 'authz_status' => $portAuthSessionEntryParameters['cafSessionStatus'], - 'authz_by' => $portAuthSessionEntryParameters['cafSessionAuthorizedBy'], - 'timeout' => $portAuthSessionEntryParameters['cafSessionTimeout'], - 'time_left' => $portAuthSessionEntryParameters['cafSessionTimeLeft'], - 'vlan' => $portAuthSessionEntryParameters['cafSessionAuthVlan'], + 'domain' => $portAuthSessionEntryParameters['cafSessionDomain'] ?? '', + 'username' => $portAuthSessionEntryParameters['cafSessionAuthUserName'] ?? '', + 'ip_address' => (string) IP::fromHexString($portAuthSessionEntryParameters['cafSessionClientAddress'] ?? '', true), + 'host_mode' => $portAuthSessionEntryParameters['cafSessionAuthHostMode'] ?? '', + 'authz_status' => $portAuthSessionEntryParameters['cafSessionStatus'] ?? '', + 'authz_by' => $portAuthSessionEntryParameters['cafSessionAuthorizedBy'] ?? '', + 'timeout' => $portAuthSessionEntryParameters['cafSessionTimeout'] ?? '', + 'time_left' => $portAuthSessionEntryParameters['cafSessionTimeLeft'] ?? null, + 'vlan' => $portAuthSessionEntryParameters['cafSessionAuthVlan'] ?? null, 'authc_status' => $session_info['authc_status'] ?? '', 'method' => $session_info['method'] ?? '', ]));