DPP2: Add Protocol Version attr to Auth Resp only if peer is R2 or newer
There is no need for the Protocol Version attribute in Authentication Response if the peer is a DPP R1 device since such device would not know how to use this attribute. To reduce risk for interoperability issues, add this new attribute only if the peer included it in Authentication Request. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
505797b458
commit
5e98998ec1
1 changed files with 5 additions and 3 deletions
|
@ -1920,9 +1920,11 @@ static struct wpabuf * dpp_auth_build_resp(struct dpp_authentication *auth,
|
||||||
|
|
||||||
#ifdef CONFIG_DPP2
|
#ifdef CONFIG_DPP2
|
||||||
/* Protocol Version */
|
/* Protocol Version */
|
||||||
wpabuf_put_le16(msg, DPP_ATTR_PROTOCOL_VERSION);
|
if (auth->peer_version >= 2) {
|
||||||
wpabuf_put_le16(msg, 1);
|
wpabuf_put_le16(msg, DPP_ATTR_PROTOCOL_VERSION);
|
||||||
wpabuf_put_u8(msg, 2);
|
wpabuf_put_le16(msg, 1);
|
||||||
|
wpabuf_put_u8(msg, 2);
|
||||||
|
}
|
||||||
#endif /* CONFIG_DPP2 */
|
#endif /* CONFIG_DPP2 */
|
||||||
|
|
||||||
attr_end = wpabuf_put(msg, 0);
|
attr_end = wpabuf_put(msg, 0);
|
||||||
|
|
Loading…
Reference in a new issue