From c7b072ff2103624446b0d913fc8f98b4fa86cf5b Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Wed, 9 Sep 2020 01:49:28 +0200 Subject: [PATCH] ap: Accept P2P wildcard SSIDs in probe requests Add the special case "DIRECT-" SSID, called the P2P Wildcard SSID, in ap_probe_req_cb so as not to reject those Probe Requests on the basis of ssid mismatch. I'd have preferred to keep all the P2P-specific bits in p2p.c but in this case there's little point in adding a generic config setting for SSID-matching quirks. --- src/ap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ap.c b/src/ap.c index 1cee185c..c972cfcb 100644 --- a/src/ap.c +++ b/src/ap.c @@ -1682,6 +1682,9 @@ static void ap_probe_req_cb(const struct mmpdu_header *hdr, const void *body, else if (ssid && ssid_len == strlen(ap->config->ssid) && /* One SSID */ !memcmp(ssid, ap->config->ssid, ssid_len)) match = true; + else if (ssid && ssid_len == 7 && !memcmp(ssid, "DIRECT-", 7) && + !memcmp(ssid, ap->config->ssid, 7)) /* P2P wildcard */ + match = true; else if (ssid_list) { /* SSID List */ ie_tlv_iter_init(&iter, ssid_list, ssid_list_len);