From fd10cd751adbea86f53da23a698aa33f85b29782 Mon Sep 17 00:00:00 2001 From: vitalisator Date: Wed, 23 Dec 2015 14:18:06 +0100 Subject: [PATCH] improve some things in PBN OS polling --- includes/polling/os/pbn.inc.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/polling/os/pbn.inc.php b/includes/polling/os/pbn.inc.php index 01279757ee..ba424d7e9a 100644 --- a/includes/polling/os/pbn.inc.php +++ b/includes/polling/os/pbn.inc.php @@ -7,8 +7,9 @@ if (preg_match('/^Pacific Broadband Networks .+\n.+ Version ([^,]+), .+\n.+\n.+\ // for PBN CPE 120/121 } else if (strstr(snmp_get($device, 'SNMPv2-MIB::sysObjectID.0', '-Ovqn'), '.1.3.6.1.4.1.11606.24.1.1.10')) { - $version = snmp_get($device, '1.3.6.1.4.1.11606.24.1.1.6.0', '-Ovq'); - $hardware = snmp_get($device, '1.3.6.1.4.1.11606.24.1.1.7.0', '-Ovq'); - $features = snmp_get($device, '1.3.6.1.4.1.11606.24.1.1.10.0', '-Ovq'); - $serial = snmp_get($device, '1.3.6.1.4.1.11606.24.1.1.4.0', '-Ovq'); + $version = str_replace(array('"'), '', snmp_get($device, '1.3.6.1.4.1.11606.24.1.1.6.0', '-Ovq')); + $hardware = str_replace(array('"'), '', snmp_get($device, '1.3.6.1.4.1.11606.24.1.1.7.0', '-Ovq')); + $features = str_replace(array('"'), '', snmp_get($device, '1.3.6.1.4.1.11606.24.1.1.10.0', '-Ovq')); + // normalize MAC address (serial) + $serial = str_replace(array(' ', ':', '-', '"'), '', strtolower(snmp_get($device, '1.3.6.1.4.1.11606.24.1.1.4.0', '-Ovq'))); }