From: Jouni Malinen Date: Mon, 4 May 2020 10:11:00 +0000 (+0300) Subject: DPP2: Do not include Protocol Version in Auth Req when testing v1 X-Git-Tag: hostap_2_10~1372 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=769139c490754b1963e86e5edf70760cb7350112;p=thirdparty%2Fhostap.git DPP2: Do not include Protocol Version in Auth Req when testing v1 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 --- diff --git a/src/common/dpp.c b/src/common/dpp.c index 8a7ed4bcc..0d6dcd1fb 100644 --- a/src/common/dpp.c +++ b/src/common/dpp.c @@ -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