From 3ae7073198fa63f83d760d2af5975f99c5107675 Mon Sep 17 00:00:00 2001 From: Jeroen van Ingen Date: Fri, 11 Jun 2021 14:55:26 +0200 Subject: [PATCH] Small Bridge.pm fix This change will make sure that the internal _vlan_hoa() function will strip any additional index levels that may be present in input data. Not only applies to Q-BRIDGE-MIB tables with a TimeFilter index, but also to tables where part of the data comes from IEEE8021-Q-BRIDGE-MIB with both TimeFilter and PBB ID. --- lib/SNMP/Info/Bridge.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SNMP/Info/Bridge.pm b/lib/SNMP/Info/Bridge.pm index e530cf77..354e7106 100644 --- a/lib/SNMP/Info/Bridge.pm +++ b/lib/SNMP/Info/Bridge.pm @@ -429,7 +429,7 @@ sub _vlan_hoa { my $vlan; # Strip TimeFilter if we're using VlanCurrentTable - ( $vlan = $idx ) =~ s/^\d+\.//; + ($vlan = $idx) =~ s/^(\d+\.)*//g; # Convert portlist bit array to bp_index array for ( my $i = 0; $i <= $#$portlist; $i++ ) {