Browse Source

P2PS: Fix p2p_find handling to allow "wildcard" with other hash values

The org.wi-fi.wfds "wildcard" is not a full wildcard of all service
names and as such, it must not remove other service name hash values
from the Probe Request frames.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen 9 years ago
parent
commit
24533f7e81
1 changed files with 3 additions and 7 deletions
  1. 3 7
      src/p2p/p2p.c

+ 3 - 7
src/p2p/p2p.c

@@ -1196,6 +1196,7 @@ int p2p_find(struct p2p_data *p2p, unsigned int timeout,
 		 * An empty seek string means no hash values, but still an ASP
 		 * search.
 		 */
+		p2p_dbg(p2p, "ASP search");
 		p2p->p2ps_seek_count = 0;
 		p2p->p2ps_seek = 1;
 	} else if (seek && seek_count <= P2P_MAX_QUERY_HASH) {
@@ -1206,13 +1207,8 @@ int p2p_find(struct p2p_data *p2p, unsigned int timeout,
 			if (!p2ps_gen_hash(p2p, seek[i], buf))
 				continue;
 
-			/* If asking for wildcard, don't do others */
-			if (os_memcmp(buf, p2p->wild_card_hash,
-				      P2PS_HASH_LEN) == 0) {
-				count = 0;
-				break;
-			}
-
+			p2p_dbg(p2p, "Seek service %s hash " MACSTR,
+				seek[i], MAC2STR(buf));
 			os_memcpy(&p2p->p2ps_seek_hash[count * P2PS_HASH_LEN],
 				  buf, P2PS_HASH_LEN);
 			count++;