When determining the BSSID in Airespace there is only one hexadecimal digit available so skip if outside the range of 1-16, 17 is reserved for 3rd party AP's.

This commit is contained in:
Eric A. Miller
2013-11-08 19:42:40 -05:00
parent 24f8a8fdba
commit fb478d3c7b
2 changed files with 38 additions and 25 deletions

View File

@@ -16,6 +16,9 @@ version 3.09 ()
* Modify _xos_i_vlan_membership() in L3::Extreme to only include tagged * Modify _xos_i_vlan_membership() in L3::Extreme to only include tagged
ports ports
* When determining the BSSID in Airespace there is only one hexadecimal
digit available so skip if outside the range of 1-16, 17 is reserved
for 3rd party AP's.
version 3.08 (2013-10-22) version 3.08 (2013-10-22)

View File

@@ -688,37 +688,47 @@ sub i_ssidmac {
foreach my $oid ( keys %$ssidlist ) { foreach my $oid ( keys %$ssidlist ) {
my @parts = split( /\./, $oid ); my @parts = split( /\./, $oid );
my $ssid_idx = pop (@parts); my $ssid_idx = pop(@parts);
my $slot = pop (@parts); my $slot = pop(@parts);
my $last = pop (@parts); my $last = pop(@parts);
my $iid = $oid; my $iid = $oid;
# Get radio band # Get radio band
$iid =~ s/\.\d+$//; $iid =~ s/\.\d+$//;
my $ap_type = $apif_type->{$iid}; my $ap_type = $apif_type->{$iid};
# Determine if IOS based # Determine if IOS based
$iid =~ s/\.\d+$//; $iid =~ s/\.\d+$//;
my $ios = $ap_ios->{$iid} || ''; my $ios = $ap_ios->{$iid} || '';
# 17 can be used as index for 3rd Party AP's. We only have one
# hexadecimal digit to work with so skip if outside the range
if ( $ssid_idx > 0 and $ssid_idx < 17 ) {
# Four cases: # Four cases:
# IOS and 2.4Ghz count up, starts at zero # IOS and 2.4Ghz count up, starts at zero
if ($ios and $ap_type =~ /b$/) { if ( $ios and $ap_type =~ /b$/ ) {
$last = $last + ($ssid_idx - 1); $last = $last + ( $ssid_idx - 1 );
}
# IOS and 5Ghz - count down from maximum of 16
elsif ($ios and $ap_type =~ /a$/) {
$last = $last + (16 - $ssid_idx);
}
# VxWorks and 5Ghz - count up, starts at zero
elsif ($ios and $ap_type =~ /a$/) {
$last = $last + ($ssid_idx - 1);
}
# VxWorks and 2.4Ghz - count down from maximum of 16
else {
$last = $last + (16 - $ssid_idx);
} }
push (@parts, $last); # IOS and 5Ghz - count down from maximum of 16
elsif ( $ios and $ap_type =~ /a$/ ) {
$last = $last + ( 16 - $ssid_idx );
}
# VxWorks and 5Ghz - count up, starts at zero
elsif ( $ios and $ap_type =~ /a$/ ) {
$last = $last + ( $ssid_idx - 1 );
}
# VxWorks and 2.4Ghz - count down from maximum of 16
else {
$last = $last + ( 16 - $ssid_idx );
}
}
push( @parts, $last );
my $bssid = join( ':', map { sprintf( "%02x", $_ ) } @parts ); my $bssid = join( ':', map { sprintf( "%02x", $_ ) } @parts );
$i_ssidmac{$oid} = $bssid; $i_ssidmac{$oid} = $bssid;
} }