Fix Extreme XOS i_vlan_membership - Revert [28bbe0], fix bug with untagged being added to @ret twice (Robert Kerr)
This commit is contained in:
@@ -485,21 +485,26 @@ sub _xos_i_vlan_membership {
|
||||
my $index = $extreme->i_index();
|
||||
my $vlans = $extreme->ex_vlan_id();
|
||||
my $slotx = $extreme->_slot_factor() || 1000;
|
||||
my $u_ports = $extreme->ex_vlan_untagged() || {};
|
||||
my $t_ports = $extreme->ex_vlan_tagged() || {};
|
||||
|
||||
my $i_vlan_membership = {};
|
||||
foreach my $idx ( keys %$t_ports ) {
|
||||
next unless ( defined $t_ports->{$idx} );
|
||||
foreach my $idx ( keys %$u_ports ) {
|
||||
next unless ( defined $u_ports->{$idx} );
|
||||
my $u_portlist = $u_ports->{$idx};
|
||||
my $t_portlist = $t_ports->{$idx};
|
||||
my $ret = [];
|
||||
|
||||
my ( $vlan_if, $slot ) = $idx =~ /^(\d+)\.(\d+)/;
|
||||
my $vlan = $vlans->{$vlan_if} || '';
|
||||
|
||||
# Convert portlist bit array to bp_index array
|
||||
for ( my $i = 0; $i <= $#$t_portlist; $i++ ) {
|
||||
push( @{$ret}, ( $slotx * $slot + $i + 1 ) )
|
||||
if ( @$t_portlist[$i] );
|
||||
foreach my $portlist ( $u_portlist, $t_portlist ) {
|
||||
|
||||
# Convert portlist bit array to bp_index array
|
||||
for ( my $i = 0; $i <= $#$portlist; $i++ ) {
|
||||
push( @{$ret}, ( $slotx * $slot + $i + 1 ) )
|
||||
if ( @$portlist[$i] );
|
||||
}
|
||||
}
|
||||
|
||||
#Create HoA ifIndex -> VLAN array
|
||||
|
||||
Reference in New Issue
Block a user