DPP: Testing functionality to omit Protocol Version from Peer Discovery

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>
This commit is contained in:
Jouni Malinen 2021-12-03 21:16:21 +02:00 committed by Jouni Malinen
parent 341e7cd664
commit b21b310148
3 changed files with 18 additions and 0 deletions

View 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

View 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;

View 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)