]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP: Testing functionality to omit Protocol Version from Peer Discovery
authorJouni Malinen <quic_jouni@quicinc.com>
Fri, 3 Dec 2021 19:16:21 +0000 (21:16 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 3 Dec 2021 19:24:59 +0000 (21:24 +0200)
Allow the dpp_test parameter to be used to request the Protocol Version
attributed to be omitted from the Peer Discovery Request/Response
message.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/ap/dpp_hostapd.c
src/common/dpp.h
wpa_supplicant/dpp_supplicant.c

index cd50d17d93c8ebbe5c89a8ee8a2ecbc37d38843e..cb6d2c4b832d041f51ece09111f6373aece42bea 100644 (file)
@@ -1554,6 +1554,10 @@ skip_status:
 
 #ifdef CONFIG_TESTING_OPTIONS
 skip_connector:
+       if (dpp_test == DPP_TEST_NO_PROTOCOL_VERSION_PEER_DISC_RESP) {
+               wpa_printf(MSG_INFO, "DPP: TESTING - no Protocol Version");
+               goto skip_proto_ver;
+       }
 #endif /* CONFIG_TESTING_OPTIONS */
 
 #ifdef CONFIG_DPP2
@@ -1578,6 +1582,10 @@ skip_connector:
        }
 #endif /* CONFIG_DPP2 */
 
+#ifdef CONFIG_TESTING_OPTIONS
+skip_proto_ver:
+#endif /* CONFIG_TESTING_OPTIONS */
+
        wpa_printf(MSG_DEBUG, "DPP: Send Peer Discovery Response to " MACSTR
                   " status=%d", MAC2STR(src), status);
        wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_TX "dst=" MACSTR
index 0f59a883e24cb07aca8adf4b1dba86934df5e33b..e8e8b140b2a731de69470030fe5d09d90a818296 100644 (file)
@@ -494,6 +494,8 @@ enum dpp_test_behavior {
        DPP_TEST_STOP_AT_AUTH_CONF = 89,
        DPP_TEST_STOP_AT_CONF_REQ = 90,
        DPP_TEST_REJECT_CONFIG = 91,
+       DPP_TEST_NO_PROTOCOL_VERSION_PEER_DISC_REQ = 92,
+       DPP_TEST_NO_PROTOCOL_VERSION_PEER_DISC_RESP = 93,
 };
 
 extern enum dpp_test_behavior dpp_test;
index 8e58e63beb8610e95dd6564d18c94ae90570be70..46f9692d8abec1a907cbec81c7ed21b8337e230c 100644 (file)
@@ -3202,6 +3202,10 @@ skip_trans_id:
 
 #ifdef CONFIG_TESTING_OPTIONS
 skip_connector:
+       if (dpp_test == DPP_TEST_NO_PROTOCOL_VERSION_PEER_DISC_REQ) {
+               wpa_printf(MSG_INFO, "DPP: TESTING - no Protocol Version");
+               goto skip_proto_ver;
+       }
 #endif /* CONFIG_TESTING_OPTIONS */
 
 #ifdef CONFIG_DPP2
@@ -3226,6 +3230,10 @@ skip_connector:
        }
 #endif /* CONFIG_DPP2 */
 
+#ifdef CONFIG_TESTING_OPTIONS
+skip_proto_ver:
+#endif /* CONFIG_TESTING_OPTIONS */
+
        /* TODO: Timeout on AP response */
        wait_time = wpa_s->max_remain_on_chan;
        if (wait_time > 2000)