Skip to content

Commit

Permalink
cfg80211: Ingore country IEs with a zero set of number of channels
Browse files Browse the repository at this point in the history
Previous to this and the last patch, titled,

"cfg80211: Fix 2 GHz subband calculation for country IEs"

we would end up treating these IEs as single channel units. These are in
fact just bogus IE triplets so ignore the entire IE if these are found.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Jan 14, 2010
1 parent c99445b commit a0f2e0f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,9 @@ static int max_subband_chan(int orig_cur_chan,
break;
}

if (triplet->chans.num_channels == 0)
return 0;

/* Monitonically increasing channel order */
if (triplet->chans.first_channel <= end_subband_chan)
return 0;
Expand Down Expand Up @@ -737,6 +740,9 @@ static struct ieee80211_regdomain *country_ie_2_rd(
break;
}

if (triplet->chans.num_channels == 0)
return NULL;

/* 2 GHz */
if (triplet->chans.first_channel <= 14)
end_channel = triplet->chans.first_channel +
Expand Down

0 comments on commit a0f2e0f

Please sign in to comment.