aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_server/eap_sim.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-02-03 03:48:08 (GMT)
committerJouni Malinen <j@w1.fi>2008-02-03 03:48:08 (GMT)
commitc789f95d039b97b27dc22189dfb74bdbd3ea055d (patch)
tree76cfaefe5f08a038df1b549d3cf985ee0a7da1d1 /src/eap_server/eap_sim.c
parentd9263104ded0cbdf5cf9e2ec916b425665e9ec7a (diff)
downloadhostap-history-c789f95d039b97b27dc22189dfb74bdbd3ea055d.zip
hostap-history-c789f95d039b97b27dc22189dfb74bdbd3ea055d.tar.gz
hostap-history-c789f95d039b97b27dc22189dfb74bdbd3ea055d.tar.bz2
Fixed EAP-SIM Start response processing for fast reauthentication case
The AT_NONCE_MT and AT_SELECTED_VERSION attributes are only included in the SIM/Start response when using full authentication. Fixed the code not to require these to be present when fast reauthentication is used.
Diffstat (limited to 'src/eap_server/eap_sim.c')
-rw-r--r--src/eap_server/eap_sim.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/eap_server/eap_sim.c b/src/eap_server/eap_sim.c
index 76513a6..05c40d0 100644
--- a/src/eap_server/eap_sim.c
+++ b/src/eap_server/eap_sim.c
@@ -397,20 +397,6 @@ static void eap_sim_process_start(struct eap_sm *sm,
wpa_printf(MSG_DEBUG, "EAP-SIM: Receive start response");
- if (attr->nonce_mt == NULL || attr->selected_version < 0) {
- wpa_printf(MSG_DEBUG, "EAP-SIM: Start/Response missing "
- "required attributes");
- eap_sim_state(data, FAILURE);
- return;
- }
-
- if (!eap_sim_supported_ver(data, attr->selected_version)) {
- wpa_printf(MSG_DEBUG, "EAP-SIM: Peer selected unsupported "
- "version %d", attr->selected_version);
- eap_sim_state(data, FAILURE);
- return;
- }
-
if (attr->identity) {
os_free(sm->identity);
sm->identity = os_malloc(attr->identity_len);
@@ -464,6 +450,20 @@ static void eap_sim_process_start(struct eap_sm *sm,
return;
}
+ if (attr->nonce_mt == NULL || attr->selected_version < 0) {
+ wpa_printf(MSG_DEBUG, "EAP-SIM: Start/Response missing "
+ "required attributes");
+ eap_sim_state(data, FAILURE);
+ return;
+ }
+
+ if (!eap_sim_supported_ver(data, attr->selected_version)) {
+ wpa_printf(MSG_DEBUG, "EAP-SIM: Peer selected unsupported "
+ "version %d", attr->selected_version);
+ eap_sim_state(data, FAILURE);
+ return;
+ }
+
data->counter = 0; /* reset re-auth counter since this is full auth */
data->reauth = NULL;