]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Fix PROBE_REQ_ONLY flag use for Provision Discovery Request
authorNeeraj Kumar Garg <neerajkg@broadcom.com>
Sun, 18 Dec 2011 15:42:11 +0000 (17:42 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 18 Dec 2011 15:42:11 +0000 (17:42 +0200)
Provision discovery from a known peer should actually check for
dev->flags & P2P_DEV_PROBE_REQ_ONLY. This is creating an issue of
updating the listen frequency of peer with the PD request frame
frequency. PD request frame will be sent by the peer on our local listen
frequency. This patch fixes that error. Suggested check has already been
implemented in the invitation req receive path.

src/p2p/p2p_pd.c

index 790334f6b11edc79e3e8a46e82eb0d4cfb479d46..1ee59c5ab10a2805caa19d0483ddc2a5e46d9fb8 100644 (file)
@@ -112,7 +112,7 @@ void p2p_process_prov_disc_req(struct p2p_data *p2p, const u8 *sa,
                MAC2STR(sa), msg.wps_config_methods, rx_freq);
 
        dev = p2p_get_device(p2p, sa);
-       if (dev == NULL || !(dev->flags & P2P_DEV_PROBE_REQ_ONLY)) {
+       if (dev == NULL || (dev->flags & P2P_DEV_PROBE_REQ_ONLY)) {
                wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
                        "P2P: Provision Discovery Request from "
                        "unknown peer " MACSTR, MAC2STR(sa));