]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P2: Check peer_addr being available more consistently
authorJouni Malinen <j@w1.fi>
Sun, 23 Feb 2025 09:43:20 +0000 (11:43 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 23 Feb 2025 09:43:20 +0000 (11:43 +0200)
It looks like peer_addr might be NULL here in the p2p2 case since the
client role case is setting peer_addr explicitly only with !wpa_s->p2p2.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/p2p_supplicant.c

index 4c64c18024741bc239f401dd448ecd40f51e1a3b..f43d0fe48d07dcc967910950a6559fff4fb3dbae 100644 (file)
@@ -8877,7 +8877,8 @@ int wpas_p2p_invite(struct wpa_supplicant *wpa_s, const u8 *peer_addr,
 
 #ifdef CONFIG_PASN
        if (p2p2) {
-               if (wpas_p2p_initiate_pasn_verify(wpa_s, peer_addr, role, bssid,
+               if (peer_addr &&
+                   wpas_p2p_initiate_pasn_verify(wpa_s, peer_addr, role, bssid,
                                                  ssid->ssid, ssid->ssid_len,
                                                  force_freq, go_dev_addr,
                                                  pref_freq) < 0) {