]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Fix 802.11b-only rate validation for Probe Request frames
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 2 Aug 2011 08:18:03 +0000 (11:18 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 2 Aug 2011 08:18:03 +0000 (11:18 +0300)
Commit e1d526293b27f5123777e695750a0d38bdfe936a added code for verifying
whether the receive Probe Request frame was indicating support for only
802.11b rates, but it missed the for loop for the extended supported
rates element. Add that to fix the validation code for cases where
non-802.11b rates are in the extended supported rates element.

src/p2p/p2p.c

index 75a0329264d77273af5e39dfbd3697b5e49ff1c1..9cfee506cbf319faa126a9772a3d8f75cb6e71e3 100644 (file)
@@ -1665,6 +1665,14 @@ static int supp_rates_11b_only(struct ieee802_11_elems *elems)
                        num_others++;
        }
 
+       for (i = 0; elems->ext_supp_rates && i < elems->ext_supp_rates_len;
+            i++) {
+               if (is_11b(elems->ext_supp_rates[i]))
+                       num_11b++;
+               else
+                       num_others++;
+       }
+
        return num_11b > 0 && num_others == 0;
 }