mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
wext: don't overwrite BSS frequency
mac80211 sends _both_ channel and frequency in it's scan results, with frequency first and channel second (it's since been fixed to send channel first and frequency second to work around this issue). This results in wpa_supplicant getting the right value when the frequency comes, but overwriting the value with '0' when the channel comes because wpa_supplicant can't handle 5GHz channel numbers. So if a valid previous SIOCGIWFREQ event came in, don't try to overwrite it.
This commit is contained in:
parent
d952d16df4
commit
2e5a7b49a0
@ -1294,8 +1294,15 @@ static void wext_get_scan_freq(struct iw_event *iwe,
|
||||
/*
|
||||
* Some drivers do not report frequency, but a channel.
|
||||
* Try to map this to frequency by assuming they are using
|
||||
* IEEE 802.11b/g.
|
||||
* IEEE 802.11b/g. But don't overwrite a previously parsed
|
||||
* frequency if the driver sends both frequency and channel,
|
||||
* since the driver may be sending an A-band channel that we
|
||||
* don't handle here.
|
||||
*/
|
||||
|
||||
if (res->res.freq)
|
||||
return;
|
||||
|
||||
if (iwe->u.freq.m >= 1 && iwe->u.freq.m <= 13) {
|
||||
res->res.freq = 2407 + 5 * iwe->u.freq.m;
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user