mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 10:18:21 -05:00
Prevent ap_scan change during association
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
This commit is contained in:
parent
8f5b9aa19a
commit
48f8e03622
@ -1712,6 +1712,16 @@ int wpa_supplicant_set_ap_scan(struct wpa_supplicant *wpa_s, int ap_scan)
|
||||
if (ap_scan < 0 || ap_scan > 2)
|
||||
return -1;
|
||||
|
||||
#ifdef ANDROID
|
||||
if (ap_scan == 2 && ap_scan != wpa_s->conf->ap_scan &&
|
||||
wpa_s->wpa_state >= WPA_ASSOCIATING &&
|
||||
wpa_s->wpa_state < WPA_COMPLETED) {
|
||||
wpa_printf(MSG_ERROR, "ap_scan = %d (%d) rejected while "
|
||||
"associating", wpa_s->conf->ap_scan, ap_scan);
|
||||
return 0;
|
||||
}
|
||||
#endif /* ANDROID */
|
||||
|
||||
old_ap_scan = wpa_s->conf->ap_scan;
|
||||
wpa_s->conf->ap_scan = ap_scan;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user