From 24533f7e811a2a910ca2eda5215b7271754ba950 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 18 Jun 2015 17:07:47 +0300 Subject: [PATCH] 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 --- src/p2p/p2p.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index cea63f483..271b9eab4 100644 --- a/src/p2p/p2p.c +++ b/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++;