better interface naming for Ubiquiti

This commit is contained in:
Oliver Gorwits
2018-03-17 14:18:09 +00:00
parent f8b3381d16
commit 4c5d0a5695
2 changed files with 44 additions and 4 deletions

View File

@@ -119,12 +119,12 @@ sub uptime {
# concatentate ifDesc and ifIndex.
# (code from SNMP/Info/Layer2/Netgear.pm)
sub interfaces {
my $netgear = shift;
my $netsnmp = shift;
my $partial = shift;
my $interfaces = $netgear->i_index($partial) || {};
my $i_descr = $netgear->i_description($partial) || {};
my $i_name = $netgear->i_name($partial);
my $interfaces = $netsnmp->i_index($partial) || {};
my $i_descr = $netsnmp->i_description($partial) || {};
my $i_name = $netsnmp->i_name($partial);
my $i_isset = ();
# Replace the description with the ifName field, if set
foreach my $iid ( keys %$i_name ) {