we always return devices to discover
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user