]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Clear P2P_DEV_SD_INFO when new wildcard SD query is added
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 11 Apr 2012 14:51:19 +0000 (17:51 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 11 Apr 2012 14:51:19 +0000 (17:51 +0300)
Unlike the unicast SD queries, the queries directed to all peers depend
on P2P_DEV_SD_INFO flag being cleared to allow the query to be sent to
a peer that has previously replied to any SD query.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

src/p2p/p2p_sd.c

index 9e3588a54f2ab01f0656a8858aac0d7612dcbbf8..1a572101b5ec59f0fc82be3dd55894179d08f904 100644 (file)
@@ -861,6 +861,12 @@ void * p2p_sd_request(struct p2p_data *p2p, const u8 *dst,
        p2p->sd_queries = q;
        wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Added SD Query %p", q);
 
+       if (dst == NULL) {
+               struct p2p_device *dev;
+               dl_list_for_each(dev, &p2p->devices, struct p2p_device, list)
+                       dev->flags &= ~P2P_DEV_SD_INFO;
+       }
+
        return q;
 }