]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P2: Do not include WPS IE in GO Negotiation
authorShivani Baranwal <quic_shivbara@quicinc.com>
Sun, 4 Aug 2024 21:03:48 +0000 (02:33 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 5 Sep 2024 22:06:32 +0000 (01:06 +0300)
Do not include WPS IE when going through GO Negotiation with a P2P2
peer.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
src/p2p/p2p_go_neg.c

index 970bb39389d6b1530f5ab95dd643e8a16e0461eb..67dc98ff733853d3b4e946bbee3ef075dbda1657 100644 (file)
@@ -216,7 +216,7 @@ static struct wpabuf * p2p_build_go_neg_req(struct p2p_data *p2p,
        pw_id = p2p_wps_method_pw_id(peer->wps_method);
        if (peer->oob_pw_id)
                pw_id = peer->oob_pw_id;
-       if (p2p_build_wps_ie(p2p, buf, pw_id, 0) < 0) {
+       if (!peer->p2p2 && p2p_build_wps_ie(p2p, buf, pw_id, 0) < 0) {
                p2p_dbg(p2p, "Failed to build WPS IE for GO Negotiation Request");
                wpabuf_free(subelems);
                wpabuf_free(buf);
@@ -406,7 +406,7 @@ static struct wpabuf * p2p_build_go_neg_resp(struct p2p_data *p2p,
        pw_id = p2p_wps_method_pw_id(peer ? peer->wps_method : WPS_NOT_READY);
        if (peer && peer->oob_pw_id)
                pw_id = peer->oob_pw_id;
-       if (p2p_build_wps_ie(p2p, buf, pw_id, 0) < 0) {
+       if (peer && !peer->p2p2 && p2p_build_wps_ie(p2p, buf, pw_id, 0) < 0) {
                p2p_dbg(p2p, "Failed to build WPS IE for GO Negotiation Response");
                wpabuf_free(subelems);
                wpabuf_free(buf);