Search Linux Wireless

Re: [PATCH 2/4] cfg80211: fix 2 GHz subband calculation for country IEs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 8, 2010 at 5:14 AM, Jouni Malinen <j@xxxxx> wrote:
> On Thu, Jan 07, 2010 at 05:24:55PM -0500, Luis R. Rodriguez wrote:
>> --- a/net/wireless/reg.c
>> +++ b/net/wireless/reg.c
>> @@ -555,7 +555,7 @@ static struct ieee80211_regdomain *country_ie_2_rd(
>>               /* 2 GHz */
>>               if (triplet->chans.first_channel <= 14)
>
> By the way, that looks completely bogus.. Channel number cannot be used
> to figure out whether this is 2.4 GHz or 5 GHz band (e.g., channel 8 is
> used in both). This really should be based on the band the frame with
> the Country IE was received.

This seems to me more like an issue with the spec. Doing it based on
the received band is obviously possible but what if the AP wants to
send out Country IE information for both channel 8 on 2 GHz and
channel 8 on 5 GHz?

>>                       end_channel = triplet->chans.first_channel +
>> -                             triplet->chans.num_channels;
>> +                             triplet->chans.num_channels - 1;
>
> Could be reasonable to verify that num_channels is not 0.. Based on a
> quick look, I did not notice places where negative end_channel value
> would trigger bad problems, but it would be safer to validate that the
> received information is valid before using it.

Good point, thanks, will send another patch to deal with that case.

  Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux