aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-03-13 16:18:18 (GMT)
committerJouni Malinen <j@w1.fi>2009-03-22 14:16:17 (GMT)
commit0f64f7cad9a5947acf748319346ae994ceb33963 (patch)
tree26fb6e0c33d60519e4e0267d8554c367bce04564
parent15159fd99a0274446bdfec8bfb5d3065641fcd0a (diff)
downloadhostap-06-0f64f7cad9a5947acf748319346ae994ceb33963.zip
hostap-06-0f64f7cad9a5947acf748319346ae994ceb33963.tar.gz
hostap-06-0f64f7cad9a5947acf748319346ae994ceb33963.tar.bz2
Fix TNC with EAP-TTLS
This was broken by 510c02d4a362cd572303fa845b139eacb2dab387 which added validation of eap_ttls_phase2_eap_init() return value. The main problem in the code trying to initialize a new phase 2 EAP method unconditionally; this should only happen if there is a new method in the inner method sequence. (cherry picked from commit 51853c899bcff996dbcfc352010a2157a4dd188b) Conflicts: hostapd/ChangeLog
-rw-r--r--hostapd/ChangeLog1
-rw-r--r--src/eap_server/eap_ttls.c11
2 files changed, 6 insertions, 6 deletions
diff --git a/hostapd/ChangeLog b/hostapd/ChangeLog
index c6610ac..2e63696 100644
--- a/hostapd/ChangeLog
+++ b/hostapd/ChangeLog
@@ -6,6 +6,7 @@ ChangeLog for hostapd
* fixed EAPOL/EAP reauthentication when using an external RADIUS
authentication server
* driver_prism54: fixed segmentation fault on initialization
+ * fixed TNC with EAP-TTLS
2009-02-15 - v0.6.8
* increased hostapd_cli ping interval to 5 seconds and made this
diff --git a/src/eap_server/eap_ttls.c b/src/eap_server/eap_ttls.c
index d04f4f6..21e4b21 100644
--- a/src/eap_server/eap_ttls.c
+++ b/src/eap_server/eap_ttls.c
@@ -1045,6 +1045,11 @@ static void eap_ttls_process_phase2_eap_response(struct eap_sm *sm,
next_type = sm->user->methods[0].method;
sm->user_eap_method_index = 1;
wpa_printf(MSG_DEBUG, "EAP-TTLS: try EAP type %d", next_type);
+ if (eap_ttls_phase2_eap_init(sm, data, next_type)) {
+ wpa_printf(MSG_DEBUG, "EAP-TTLS: Failed to initialize "
+ "EAP type %d", next_type);
+ eap_ttls_state(data, FAILURE);
+ }
break;
case PHASE2_METHOD:
if (data->ttls_version > 0) {
@@ -1066,12 +1071,6 @@ static void eap_ttls_process_phase2_eap_response(struct eap_sm *sm,
__func__, data->state);
break;
}
-
- if (eap_ttls_phase2_eap_init(sm, data, next_type)) {
- wpa_printf(MSG_DEBUG, "EAP-TTLS: Failed to initialize EAP "
- "type %d", next_type);
- eap_ttls_state(data, FAILURE);
- }
}