Browse Source

P2P: Fix 802.11b-only rate validation for Probe Request frames

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.
Jouni Malinen 13 years ago
parent
commit
70dbe3b6d7
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/p2p/p2p.c

+ 8 - 0
src/p2p/p2p.c

@@ -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;
 }