From c405c38effaabad1891cbafe4d6a9bef13c84df7 Mon Sep 17 00:00:00 2001 From: Eldon Koyle Date: Mon, 15 Aug 2016 11:52:21 -0600 Subject: [PATCH] Check against the proper subtype variable, initialize variable --- includes/discovery/discovery-protocols.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/discovery/discovery-protocols.inc.php b/includes/discovery/discovery-protocols.inc.php index b8b10399c6..204301f68e 100644 --- a/includes/discovery/discovery-protocols.inc.php +++ b/includes/discovery/discovery-protocols.inc.php @@ -157,7 +157,8 @@ if ($device['os'] == 'pbn' && $config['autodiscovery']['xdp'] === true) { $remote_device_id = discover_new_device($lldp['lldpRemSysName'], $device, 'LLDP', $interface); } // normalize MAC address if present - if ($lldp['lldpRemChassisIdSubtype'] == 'macAddress') { + $remote_port_mac_address = '' + if ($lldp['lldpRemPortIdSubtype'] == 'macAddress') { $remote_port_mac_address = str_replace(array(' ', ':', '-'), '', strtolower($lldp['lldpRemPortId'])); } // get remote device hostname from db by MAC address and replace lldpRemSysName if absent