diff --git a/lib/SNMP/Info/Aggregate.pm b/lib/SNMP/Info/Aggregate.pm index 0aaf0c7b..e5096f99 100644 --- a/lib/SNMP/Info/Aggregate.pm +++ b/lib/SNMP/Info/Aggregate.pm @@ -63,6 +63,8 @@ sub agg_ports_ifstack { foreach my $idx ( keys %$ifStack ) { my ( $higher, $lower ) = split /\./, $idx; next if ( $higher == 0 or $lower == 0 ); + next unless exists $ifType->{ $higher } and defined $ifType->{ $higher }; + if ( $ifType->{ $higher } eq 'ieee8023adLag' or $ifType->{ $higher } eq 'propMultiplexor' ) { $ret->{ $lower } = $higher; diff --git a/lib/SNMP/Info/CiscoAgg.pm b/lib/SNMP/Info/CiscoAgg.pm index c39518de..0538f01e 100644 --- a/lib/SNMP/Info/CiscoAgg.pm +++ b/lib/SNMP/Info/CiscoAgg.pm @@ -153,6 +153,8 @@ sub agg_ports_propvirtual { foreach my $idx ( keys %$ifStack ) { my ( $higher, $lower ) = split /\./, $idx; next if ( $higher == 0 or $lower == 0 ); + next unless exists $ifType->{ $higher } and defined $ifType->{ $higher }; + if ( $ifType->{ $higher } eq 'propVirtual' ) { # lower needs also to be configured in pagpEthcOperationMode