do not set master neigh if master is a slave
This commit is contained in:
@@ -792,6 +792,7 @@ sub store_neighbors {
|
||||
my $master = schema('netdisco')->resultset('DevicePort')
|
||||
->single({ip => $device->ip, port => $portrow->slave_of})) {
|
||||
|
||||
if (not ($portrow->is_master or defined $master->slave_of)) {
|
||||
# TODO needs refactoring - this is quite expensive
|
||||
my $peer = schema('netdisco')->resultset('DevicePort')->find({
|
||||
ip => $portrow->neighbor->ip,
|
||||
@@ -806,6 +807,7 @@ sub store_neighbors {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return @to_discover;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user