]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P2: Use peer listen frequency when initiating PASN authentication
authorShivani Baranwal <shivbara@qti.qualcomm.com>
Mon, 22 Sep 2025 09:05:39 +0000 (14:35 +0530)
committerJouni Malinen <j@w1.fi>
Mon, 13 Oct 2025 15:35:38 +0000 (18:35 +0300)
While initiating PASN authentication during P2P connect, use the peer’s
listen frequency instead of the previously used force_freq. The
force_freq is intended to be used as operating channel for the P2P group
formation, it may not match the peer’s current listen channel and can
lead to off-channel PASN attempts.

Signed-off-by: Shivani Baranwal <shivbara@qti.qualcomm.com>
wpa_supplicant/p2p_supplicant.c

index 5db5eb9156495f589df531e34053171f9f40f8f7..da9d9bd41c9dd7d8084a124267f3b618b5443b47 100644 (file)
@@ -7185,8 +7185,12 @@ int wpas_p2p_connect(struct wpa_supplicant *wpa_s, const u8 *peer_addr,
        }
 
 #ifdef CONFIG_PASN
-       if (wpa_s->p2p2 && !wpa_s->p2p_pd_before_go_neg)
-               wpas_p2p_initiate_pasn_auth(wpa_s, peer_addr, force_freq);
+       if (wpa_s->p2p2 && !wpa_s->p2p_pd_before_go_neg) {
+               int listen_freq = p2p_get_listen_freq(wpa_s->global->p2p,
+                                                     peer_addr);
+
+               wpas_p2p_initiate_pasn_auth(wpa_s, peer_addr, listen_freq);
+       }
 #endif /* CONFIG_PASN */
 
        return ret;