+ * Sort CDP/LLDP data to be more consistent when multiple neighbors on a port
+ * Add "AP" as a hint for WAP support
This commit is contained in:
@@ -666,7 +666,7 @@ sub store_neighbors {
|
||||
my $c_platform = $snmp->c_platform;
|
||||
my $c_cap = $snmp->c_cap;
|
||||
|
||||
foreach my $entry (List::MoreUtils::uniq( (keys %$c_ip), (keys %$c_cap) )) {
|
||||
foreach my $entry (sort (List::MoreUtils::uniq( (keys %$c_ip), (keys %$c_cap) ))) {
|
||||
if (!defined $c_if->{$entry} or !defined $interfaces->{ $c_if->{$entry} }) {
|
||||
debug sprintf ' [%s] neigh - port for IID:%s not resolved, skipping',
|
||||
$device->ip, $entry;
|
||||
@@ -695,11 +695,11 @@ sub store_neighbors {
|
||||
my $phone_flag = grep {/phone/i} @$remote_cap;
|
||||
my $ap_flag = grep {/wlanAccessPoint/} @$remote_cap;
|
||||
|
||||
if ($phone_flag or $remote_type =~ m/(mitel.5\d{3})/i) {
|
||||
if ($phone_flag or $remote_type =~ m/mitel.5\d{3}/i) {
|
||||
$remote_type = 'IP Phone: '. $remote_type
|
||||
if $remote_type !~ /ip phone/i;
|
||||
}
|
||||
elsif ($ap_flag) {
|
||||
elsif ($ap_flag or $remote_type =~ m/\bw?ap\b/i) {
|
||||
$remote_type = 'AP: '. $remote_type;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user