aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2007-03-06 03:27:27 (GMT)
committerJouni Malinen <j@w1.fi>2007-03-06 03:27:27 (GMT)
commit57bc28b8a163c4d9f2bfda2ffae5db84c719a764 (patch)
tree5d8095f3ad41d0503202fc937350fb57bbb19768
parent7308c3ac38190ca813b78f8e26c912cc3ca383b9 (diff)
downloadhostap-history-57bc28b8a163c4d9f2bfda2ffae5db84c719a764.zip
hostap-history-57bc28b8a163c4d9f2bfda2ffae5db84c719a764.tar.gz
hostap-history-57bc28b8a163c4d9f2bfda2ffae5db84c719a764.tar.bz2
Fixed EAP-MSCHAPv2 server to use a space between S and M parameters
in Success Request [Bug 203].
-rw-r--r--hostapd/ChangeLog2
-rw-r--r--src/eap_server/eap_mschapv2.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/hostapd/ChangeLog b/hostapd/ChangeLog
index c7f47ce..f5e516d 100644
--- a/hostapd/ChangeLog
+++ b/hostapd/ChangeLog
@@ -18,6 +18,8 @@ ChangeLog for hostapd
provides bit better triplet data for testing a single client; anyway,
if a better quality triplets are needed, GSM-Milenage should be used
instead of hardcoded triplet file)
+ * fixed EAP-MSCHAPv2 server to use a space between S and M parameters
+ in Success Request [Bug 203]
2006-11-24 - v0.5.6
* added support for configuring and controlling multiple BSSes per
diff --git a/src/eap_server/eap_mschapv2.c b/src/eap_server/eap_mschapv2.c
index 69a4768..8ab5e57 100644
--- a/src/eap_server/eap_mschapv2.c
+++ b/src/eap_server/eap_mschapv2.c
@@ -1,6 +1,6 @@
/*
* hostapd / EAP-MSCHAPv2 (draft-kamath-pppext-eap-mschapv2-00.txt) server
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline@cc.hut.fi>
+ * Copyright (c) 2004-2007, Jouni Malinen <jkmaline@cc.hut.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -132,7 +132,7 @@ static u8 * eap_mschapv2_build_success_req(struct eap_sm *sm,
char *message = "OK";
size_t ms_len;
- ms_len = sizeof(*ms) + 2 + 2 * sizeof(data->auth_response) + 2 +
+ ms_len = sizeof(*ms) + 2 + 2 * sizeof(data->auth_response) + 1 + 2 +
strlen(message);
req = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_MSCHAPV2, reqDataLen,
ms_len, EAP_CODE_REQUEST, id, &pos);
@@ -155,6 +155,7 @@ static u8 * eap_mschapv2_build_success_req(struct eap_sm *sm,
sizeof(data->auth_response) * 2 + 1,
data->auth_response,
sizeof(data->auth_response));
+ *pos++ = ' ';
*pos++ = 'M';
*pos++ = '=';
memcpy(pos, message, strlen(message));