]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP2: Do not include Protocol Version in Auth Req when testing v1
authorJouni Malinen <jouni@codeaurora.org>
Mon, 4 May 2020 10:11:00 +0000 (13:11 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 4 May 2020 10:12:21 +0000 (13:12 +0300)
When DPP v2 implementation is hardcoded to behave as v1 for testing
purposes, leave out the Protocol Version attribute form Authentication
Request instead of including it there with indication for v1.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/common/dpp.c

index 8a7ed4bcccef2e6aaba892856951928e16fe0ce4..0d6dcd1fb541e3a3caa79c58e3d17693f14e8761 100644 (file)
@@ -1853,9 +1853,11 @@ static struct wpabuf * dpp_auth_build_req(struct dpp_authentication *auth,
 
 #ifdef CONFIG_DPP2
        /* Protocol Version */
-       wpabuf_put_le16(msg, DPP_ATTR_PROTOCOL_VERSION);
-       wpabuf_put_le16(msg, 1);
-       wpabuf_put_u8(msg, DPP_VERSION);
+       if (DPP_VERSION > 1) {
+               wpabuf_put_le16(msg, DPP_ATTR_PROTOCOL_VERSION);
+               wpabuf_put_le16(msg, 1);
+               wpabuf_put_u8(msg, DPP_VERSION);
+       }
 #endif /* CONFIG_DPP2 */
 
 #ifdef CONFIG_TESTING_OPTIONS