From be609c6fc6cb6d1f06dc43db0b2dcc7f8b6e72a0 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 29 Mar 2019 23:04:35 +0200 Subject: [PATCH] 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 --- wpa_supplicant/sme.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c index b0fb62bb0..4bb5f3aef 100644 --- a/wpa_supplicant/sme.c +++ b/wpa_supplicant/sme.c @@ -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; }