fix undefined key in Discover
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
[BUG FIXES]
|
[BUG FIXES]
|
||||||
|
|
||||||
* Unrouted VLAN interfaces have numbers on Cisco - ignore them
|
* Unrouted VLAN interfaces have numbers on Cisco - ignore them
|
||||||
|
* fix undefined key in Discover
|
||||||
|
|
||||||
2.027005_001 - 2014-05-21
|
2.027005_001 - 2014-05-21
|
||||||
|
|
||||||
|
|||||||
@@ -652,13 +652,13 @@ sub store_neighbors {
|
|||||||
my $c_cap = $snmp->c_cap;
|
my $c_cap = $snmp->c_cap;
|
||||||
|
|
||||||
foreach my $entry (List::MoreUtils::uniq( (keys %$c_ip), (keys %$c_cap) )) {
|
foreach my $entry (List::MoreUtils::uniq( (keys %$c_ip), (keys %$c_cap) )) {
|
||||||
my $port = $interfaces->{ $c_if->{$entry} };
|
if (!defined $c_if->{$entry} or !defined $interfaces->{ $c_if->{$entry} }) {
|
||||||
if (!defined $port) {
|
|
||||||
debug sprintf ' [%s] neigh - port for IID:%s not resolved, skipping',
|
debug sprintf ' [%s] neigh - port for IID:%s not resolved, skipping',
|
||||||
$device->ip, $entry;
|
$device->ip, $entry;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $port = $interfaces->{ $c_if->{$entry} };
|
||||||
my $portrow = schema('netdisco')->resultset('DevicePort')
|
my $portrow = schema('netdisco')->resultset('DevicePort')
|
||||||
->single({ip => $device->ip, port => $port});
|
->single({ip => $device->ip, port => $port});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user