#321 clean interface descriptions of null and trailing space

This commit is contained in:
Oliver Gorwits
2019-04-20 09:28:06 +01:00
parent ea9ad92cc4
commit 75785f70c7
4 changed files with 31 additions and 7 deletions

View File

@@ -150,6 +150,10 @@ sub interfaces {
my $port = $i_descr->{$iid};
next unless defined $port;
my $port = SNMP::Info::munge_null($port);
$port =~ s/^\s+//; $port =~ s/\s+$//;
next unless length $port;
if ( $seen{$port}++ ) {
# (#320) also fixup the port this is a duplicate of
$interfaces->{ $first_seen_as{$port} }