]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
SAE: Fix commit message override with external authentication
authorJouni Malinen <jouni@codeaurora.org>
Fri, 29 Mar 2019 21:04:35 +0000 (23:04 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 1 Apr 2019 10:28:26 +0000 (13:28 +0300)
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>
wpa_supplicant/sme.c

index b0fb62bb0e67d35f120f8b15d5520a2599e486b6..4bb5f3aef86915b92f9c5a0e4820fab50585678f 100644 (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));
                if (!buf)
                        return NULL;
-               wpabuf_put_le16(buf, 1); /* Transaction seq# */
-               wpabuf_put_le16(buf, WLAN_STATUS_SUCCESS);
+               if (!external) {
+                       wpabuf_put_le16(buf, 1); /* Transaction seq# */
+                       wpabuf_put_le16(buf, WLAN_STATUS_SUCCESS);
+               }
                wpabuf_put_buf(buf, wpa_s->sae_commit_override);
                return buf;
        }