aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-01-28 09:59:29 (GMT)
committerJouni Malinen <j@w1.fi>2009-02-08 10:25:40 (GMT)
commit60e671b3271eaae19eceabf03ada4fce7b8e2da5 (patch)
tree475db6afb7361d69710c65c34b3d3bc0d8fee491 /src
parent4fe061aac2b38a4384d8e586b9a0345d27f49d44 (diff)
downloadhostap-06-60e671b3271eaae19eceabf03ada4fce7b8e2da5.zip
hostap-06-60e671b3271eaae19eceabf03ada4fce7b8e2da5.tar.gz
hostap-06-60e671b3271eaae19eceabf03ada4fce7b8e2da5.tar.bz2
Fixed WPS Authenticator attribute processing after M2D
We must not replace M1 with M2D as the last_msg since we need M1 to validate a possible M2 after M2D. Since M2D and ACK/NACK replies do not include Authenticator attribute, we can just ignore M2D as far as updating last_msg is concerned. (cherry picked from commit 39034ce80f45110f0311aa80ca9dd62d2083ed76)
Diffstat (limited to 'src')
-rw-r--r--src/wps/wps_enrollee.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/wps/wps_enrollee.c b/src/wps/wps_enrollee.c
index d02f1c0..c3be248 100644
--- a/src/wps/wps_enrollee.c
+++ b/src/wps/wps_enrollee.c
@@ -995,7 +995,14 @@ static enum wps_process_res wps_process_wsc_msg(struct wps_data *wps,
return WPS_FAILURE;
}
- if (ret == WPS_CONTINUE) {
+ /*
+ * Save a copy of the last message for Authenticator derivation if we
+ * are continuing. However, skip M2D since it is not authenticated and
+ * neither is the ACK/NACK response frame. This allows the possibly
+ * following M2 to be processed correctly by using the previously sent
+ * M1 in Authenticator derivation.
+ */
+ if (ret == WPS_CONTINUE && *attr.msg_type != WPS_M2D) {
/* Save a copy of the last message for Authenticator derivation
*/
wpabuf_free(wps->last_msg);