fix: Fixed auto discovery for lldp not adding new hosts (#6919)

This commit is contained in:
Neil Lathwood
2017-06-29 19:29:33 +01:00
committed by GitHub
parent a4b905e3f6
commit bda5a4343e

View File

@ -142,7 +142,7 @@ if ($device['os'] == 'pbn' && $config['autodiscovery']['xdp'] === true) {
if (!$remote_device_id && is_valid_hostname($lldp['lldpRemSysName'])) {
if (!can_skip_discovery($config['autodiscovery']['xdp_exclude']['sysname_regexp'], $lldp['lldpRemSysName'], $lldp['lldpRemSysName']) &&
can_skip_discovery($config['autodiscovery']['xdp_exclude']['sysdesc_regexp'], $lldp['lldpRemSysDesc'], $lldp['lldpRemSysName'])
!can_skip_discovery($config['autodiscovery']['xdp_exclude']['sysdesc_regexp'], $lldp['lldpRemSysDesc'], $lldp['lldpRemSysName'])
) {
$remote_device_id = discover_new_device($lldp['lldpRemSysName'], $device, 'LLDP', $interface);
if (is_numeric($remote_device_id) === false) {