]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P2: Add a new method to P2P_CONNECT control interface command
authorShivani Baranwal <quic_shivbara@quicinc.com>
Fri, 30 Aug 2024 16:41:17 +0000 (22:11 +0530)
committerJouni Malinen <j@w1.fi>
Tue, 3 Sep 2024 08:05:45 +0000 (11:05 +0300)
Add a new method "pair" to indicate the connect request perform the
Wi-Fi Direct R2 methods like bootstrapping and pairing for connection.
This fixes control interface command parsing which expects method as
mandatory.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
wpa_supplicant/ctrl_iface.c

index b886c2226af69a9e8b6c1b38d86a2282b6778e77..6dba46898d505f04e232f8eadf790235d907622b 100644 (file)
@@ -6389,7 +6389,7 @@ static int p2p_ctrl_connect(struct wpa_supplicant *wpa_s, char *cmd,
                wpa_s = wpa_s->global->p2p_init_wpa_s;
        }
 
-       /* <addr> <"pbc" | "pin" | PIN> [label|display|keypad|p2ps]
+       /* <addr> <"pbc" | "pin" | "pair" | PIN> [label|display|keypad|p2ps]
         * [persistent|persistent=<network id>]
         * [join] [auth] [go_intent=<0..15>] [freq=<in MHz>] [provdisc]
         * [ht40] [vht] [he] [edmg] [auto] [ssid=<hexdump>]
@@ -6484,7 +6484,7 @@ static int p2p_ctrl_connect(struct wpa_supplicant *wpa_s, char *cmd,
                wps_method = WPS_PBC;
        } else if (os_strstr(pos, "p2ps") != NULL) {
                wps_method = WPS_P2PS;
-       } else if (p2p2) {
+       } else if (os_strncmp(pos, "pair", 4) == 0 && p2p2) {
                wps_method = WPS_NOT_READY;
        } else {
                pin = pos;