Modify _xos_i_vlan_membership() in L3::Extreme to only include tagged ports
This commit is contained in:
@@ -8,6 +8,11 @@ version 3.09 ()
|
|||||||
L3::IBMGbTor
|
L3::IBMGbTor
|
||||||
* [] set_i_untagged combines both set_i_vlan and set_i_pvid in one method
|
* [] set_i_untagged combines both set_i_vlan and set_i_pvid in one method
|
||||||
|
|
||||||
|
[BUG FIXES]
|
||||||
|
|
||||||
|
* Modify _xos_i_vlan_membership() in L3::Extreme to only include tagged
|
||||||
|
ports
|
||||||
|
|
||||||
version 3.08 (2013-10-22)
|
version 3.08 (2013-10-22)
|
||||||
|
|
||||||
[ENHANCEMENTS]
|
[ENHANCEMENTS]
|
||||||
|
|||||||
@@ -485,34 +485,29 @@ sub _xos_i_vlan_membership {
|
|||||||
my $index = $extreme->i_index();
|
my $index = $extreme->i_index();
|
||||||
my $vlans = $extreme->ex_vlan_id();
|
my $vlans = $extreme->ex_vlan_id();
|
||||||
my $slotx = $extreme->_slot_factor() || 1000;
|
my $slotx = $extreme->_slot_factor() || 1000;
|
||||||
my $u_ports = $extreme->ex_vlan_untagged() || {};
|
|
||||||
my $t_ports = $extreme->ex_vlan_tagged() || {};
|
my $t_ports = $extreme->ex_vlan_tagged() || {};
|
||||||
|
|
||||||
my $i_vlan_membership = {};
|
my $i_vlan_membership = {};
|
||||||
foreach my $idx ( keys %$u_ports ) {
|
foreach my $idx ( keys %$t_ports ) {
|
||||||
next unless ( defined $u_ports->{$idx} );
|
next unless ( defined $t_ports->{$idx} );
|
||||||
my $u_portlist = $u_ports->{$idx};
|
|
||||||
my $t_portlist = $t_ports->{$idx};
|
my $t_portlist = $t_ports->{$idx};
|
||||||
my $ret = [];
|
my $ret = [];
|
||||||
|
|
||||||
my ( $vlan_if, $slot ) = $idx =~ /^(\d+)\.(\d+)/;
|
my ( $vlan_if, $slot ) = $idx =~ /^(\d+)\.(\d+)/;
|
||||||
my $vlan = $vlans->{$vlan_if} || '';
|
my $vlan = $vlans->{$vlan_if} || '';
|
||||||
|
|
||||||
foreach my $portlist ( $u_portlist, $t_portlist ) {
|
# 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] );
|
||||||
|
}
|
||||||
|
|
||||||
# Convert portlist bit array to bp_index array
|
#Create HoA ifIndex -> VLAN array
|
||||||
for ( my $i = 0; $i <= $#$portlist; $i++ ) {
|
foreach my $port ( @{$ret} ) {
|
||||||
push( @{$ret}, ( $slotx * $slot + $i + 1 ) )
|
my $ifindex = $index->{$port};
|
||||||
if ( @$portlist[$i] );
|
next unless ( defined($ifindex) ); # shouldn't happen
|
||||||
}
|
next if ( defined $partial and $ifindex !~ /^$partial$/ );
|
||||||
|
push( @{ $i_vlan_membership->{$ifindex} }, $vlan );
|
||||||
#Create HoA ifIndex -> VLAN array
|
|
||||||
foreach my $port ( @{$ret} ) {
|
|
||||||
my $ifindex = $index->{$port};
|
|
||||||
next unless ( defined($ifindex) ); # shouldn't happen
|
|
||||||
next if ( defined $partial and $ifindex !~ /^$partial$/ );
|
|
||||||
push( @{ $i_vlan_membership->{$ifindex} }, $vlan );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $i_vlan_membership;
|
return $i_vlan_membership;
|
||||||
|
|||||||
Reference in New Issue
Block a user