DPP: Testing capability for invalid Protocol Version in Network Intro
This extends dpp_test functionality to allow DPP Network Introduction exchanges to use an incorrect value in the Protocol Version attribute. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
c93679a87f
commit
1822bd3789
3 changed files with 16 additions and 0 deletions
|
@ -1833,6 +1833,13 @@ skip_connector:
|
|||
}
|
||||
#endif /* CONFIG_DPP3 */
|
||||
|
||||
#ifdef CONFIG_TESTING_OPTIONS
|
||||
if (dpp_test == DPP_TEST_INVALID_PROTOCOL_VERSION_PEER_DISC_RESP) {
|
||||
wpa_printf(MSG_INFO, "DPP: TESTING - invalid Protocol Version");
|
||||
ver = 1;
|
||||
}
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
|
||||
/* Protocol Version */
|
||||
wpabuf_put_le16(msg, DPP_ATTR_PROTOCOL_VERSION);
|
||||
wpabuf_put_le16(msg, 1);
|
||||
|
|
|
@ -500,6 +500,8 @@ enum dpp_test_behavior {
|
|||
DPP_TEST_REJECT_CONFIG = 91,
|
||||
DPP_TEST_NO_PROTOCOL_VERSION_PEER_DISC_REQ = 92,
|
||||
DPP_TEST_NO_PROTOCOL_VERSION_PEER_DISC_RESP = 93,
|
||||
DPP_TEST_INVALID_PROTOCOL_VERSION_PEER_DISC_REQ = 94,
|
||||
DPP_TEST_INVALID_PROTOCOL_VERSION_PEER_DISC_RESP = 95,
|
||||
};
|
||||
|
||||
extern enum dpp_test_behavior dpp_test;
|
||||
|
|
|
@ -3369,6 +3369,13 @@ skip_connector:
|
|||
}
|
||||
#endif /* CONFIG_DPP3 */
|
||||
|
||||
#ifdef CONFIG_TESTING_OPTIONS
|
||||
if (dpp_test == DPP_TEST_INVALID_PROTOCOL_VERSION_PEER_DISC_REQ) {
|
||||
wpa_printf(MSG_INFO, "DPP: TESTING - invalid Protocol Version");
|
||||
ver = 1;
|
||||
}
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
|
||||
/* Protocol Version */
|
||||
wpabuf_put_le16(msg, DPP_ATTR_PROTOCOL_VERSION);
|
||||
wpabuf_put_le16(msg, 1);
|
||||
|
|
Loading…
Reference in a new issue