SAE: Fix commit message override with external authentication

Do not add duplicate Transaction Sequence and Status Code fields when
using test functionality to override SAE commit message.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2019-03-29 23:04:35 +02:00 committed by Jouni Malinen
parent d08ef5798d
commit be609c6fc6

View File

@ -98,8 +98,10 @@ static struct wpabuf * sme_auth_build_sae_commit(struct wpa_supplicant *wpa_s,
buf = wpabuf_alloc(4 + wpabuf_len(wpa_s->sae_commit_override)); buf = wpabuf_alloc(4 + wpabuf_len(wpa_s->sae_commit_override));
if (!buf) if (!buf)
return NULL; return NULL;
wpabuf_put_le16(buf, 1); /* Transaction seq# */ if (!external) {
wpabuf_put_le16(buf, WLAN_STATUS_SUCCESS); wpabuf_put_le16(buf, 1); /* Transaction seq# */
wpabuf_put_le16(buf, WLAN_STATUS_SUCCESS);
}
wpabuf_put_buf(buf, wpa_s->sae_commit_override); wpabuf_put_buf(buf, wpa_s->sae_commit_override);
return buf; return buf;
} }