we always return devices to discover

This commit is contained in:
Oliver Gorwits
2017-06-24 18:28:18 +01:00
parent 55edd65734
commit cfcda9f786

View File

@@ -835,13 +835,11 @@ sub store_neighbors {
' [%s] neigh - port %s has multiple neighbors, setting remote as self', ' [%s] neigh - port %s has multiple neighbors, setting remote as self',
$device->ip, $port; $device->ip, $port;
if (wantarray) { foreach my $n (@$remote_ip) {
foreach my $n (@$remote_ip) { debug sprintf
debug sprintf ' [%s] neigh - adding neighbor %s, type [%s], on %s to discovery queue',
' [%s] neigh - adding neighbor %s, type [%s], on %s to discovery queue', $device->ip, $n, ($remote_type || ''), $port;
$device->ip, $n, ($remote_type || ''), $port; push @to_discover, [$n, $remote_type];
push @to_discover, [$n, $remote_type];
}
} }
# set self as remote IP to suppress any further work # set self as remote IP to suppress any further work
@@ -850,12 +848,10 @@ sub store_neighbors {
} }
else { else {
# what we came here to do.... discover the neighbor # what we came here to do.... discover the neighbor
if (wantarray) { debug sprintf
debug sprintf ' [%s] neigh - adding neighbor %s, type [%s], on %s to discovery queue',
' [%s] neigh - adding neighbor %s, type [%s], on %s to discovery queue', $device->ip, $remote_ip, ($remote_type || ''), $port;
$device->ip, $remote_ip, ($remote_type || ''), $port; push @to_discover, [$remote_ip, $remote_type];
push @to_discover, [$remote_ip, $remote_type];
}
# further device type discovery using MAC OUI # further device type discovery using MAC OUI
# only works once device is fully discovered (so we have a MAC addr) # only works once device is fully discovered (so we have a MAC addr)