[pkg-wpa-devel] r1108 - in /wpasupplicant/trunk: debian/ src/ src/eap_common/ src/eap_peer/ src/eap_server/ src/eapol_supp/ src/rsn_supp/ src/tls/ wpa_supplicant/ wpa_supplicant/doc/ wpa_supplicant/wpa_gui-qt4/
kelmo-guest at users.alioth.debian.org
kelmo-guest at users.alioth.debian.org
Wed Feb 6 05:37:55 UTC 2008
Author: kelmo-guest
Date: Wed Feb 6 05:37:54 2008
New Revision: 1108
URL: http://svn.debian.org/wsvn/pkg-wpa/?sc=1&rev=1108
Log:
* New Upstream git snapshot.
Modified:
wpasupplicant/trunk/debian/changelog
wpasupplicant/trunk/src/Makefile
wpasupplicant/trunk/src/eap_common/eap_sim_common.c
wpasupplicant/trunk/src/eap_peer/eap_sim.c
wpasupplicant/trunk/src/eap_peer/eap_ttls.c
wpasupplicant/trunk/src/eap_server/eap_aka.c
wpasupplicant/trunk/src/eap_server/eap_fast.c
wpasupplicant/trunk/src/eap_server/eap_peap.c
wpasupplicant/trunk/src/eap_server/eap_sim.c
wpasupplicant/trunk/src/eap_server/eap_sim_db.c
wpasupplicant/trunk/src/eap_server/eap_ttls.c
wpasupplicant/trunk/src/eapol_supp/eapol_supp_sm.c
wpasupplicant/trunk/src/eapol_supp/eapol_supp_sm.h
wpasupplicant/trunk/src/rsn_supp/wpa.c
wpasupplicant/trunk/src/tls/x509v3.c
wpasupplicant/trunk/wpa_supplicant/ChangeLog
wpasupplicant/trunk/wpa_supplicant/ctrl_iface.c
wpasupplicant/trunk/wpa_supplicant/doc/ctrl_iface.doxygen
wpasupplicant/trunk/wpa_supplicant/eap_testing.txt
wpasupplicant/trunk/wpa_supplicant/eapol_test.c
wpasupplicant/trunk/wpa_supplicant/todo.txt
wpasupplicant/trunk/wpa_supplicant/wpa_cli.c
wpasupplicant/trunk/wpa_supplicant/wpa_gui-qt4/scanresults.cpp
Modified: wpasupplicant/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/changelog?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/changelog (original)
+++ wpasupplicant/trunk/debian/changelog Wed Feb 6 05:37:54 2008
@@ -1,5 +1,6 @@
-wpasupplicant (0.6.2+git20080202.gde6ccd7-2) UNRELEASED; urgency=low
-
+wpasupplicant (0.6.2+git20080206.g8c0dad4-1) UNRELEASED; urgency=low
+
+ * New Upstream git snapshot.
* install-stamp was not properly implimented and is not required, clean it
up. [debian/rules]
* Drop patches to ctrl interface bss scan results iterator that will not be
@@ -10,7 +11,7 @@
- debian/patches/85_ctrl_iface_scan_bss_count_warning.patch
- debian/patches/94_wpa_gui_qt4_scanres_bss_count.patch
- -- Kel Modderman <kel at otaku42.de> Tue, 05 Feb 2008 16:24:54 +1000
+ -- Kel Modderman <kel at otaku42.de> Wed, 06 Feb 2008 15:36:48 +1000
wpasupplicant (0.6.2+git20080202.gde6ccd7-1) unstable; urgency=low
Modified: wpasupplicant/trunk/src/Makefile
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/src/Makefile?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/src/Makefile (original)
+++ wpasupplicant/trunk/src/Makefile Wed Feb 6 05:37:54 2008
@@ -4,5 +4,5 @@
@echo Nothing to be made.
clean:
- for d in $(SUBDIRS); do $(MAKE) -C $$d clean; done
+ for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d clean; done
rm -f *~
Modified: wpasupplicant/trunk/src/eap_common/eap_sim_common.c
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/src/eap_common/eap_sim_common.c?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/src/eap_common/eap_sim_common.c (original)
+++ wpasupplicant/trunk/src/eap_common/eap_sim_common.c Wed Feb 6 05:37:54 2008
@@ -1,6 +1,6 @@
/*
* EAP peer/server: EAP-SIM/AKA shared routines
- * Copyright (c) 2004-2007, Jouni Malinen <j at w1.fi>
+ * Copyright (c) 2004-2008, Jouni Malinen <j at w1.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
@@ -119,6 +119,11 @@
const u8 *addr[4];
size_t len[4];
+ while (identity_len > 0 && identity[identity_len - 1] == 0) {
+ wpa_printf(MSG_DEBUG, "EAP-SIM: Workaround - drop null "
+ "character from the end of identity");
+ identity_len--;
+ }
addr[0] = identity;
len[0] = identity_len;
addr[1] = counter;
Modified: wpasupplicant/trunk/src/eap_peer/eap_sim.c
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/src/eap_peer/eap_sim.c?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/src/eap_peer/eap_sim.c (original)
+++ wpasupplicant/trunk/src/eap_peer/eap_sim.c Wed Feb 6 05:37:54 2008
@@ -311,14 +311,16 @@
wpa_printf(MSG_DEBUG, "Generating EAP-SIM Start (id=%d)", id);
msg = eap_sim_msg_init(EAP_CODE_RESPONSE, id,
EAP_TYPE_SIM, EAP_SIM_SUBTYPE_START);
- wpa_hexdump(MSG_DEBUG, " AT_NONCE_MT",
- data->nonce_mt, EAP_SIM_NONCE_MT_LEN);
- eap_sim_msg_add(msg, EAP_SIM_AT_NONCE_MT, 0,
- data->nonce_mt, EAP_SIM_NONCE_MT_LEN);
- wpa_printf(MSG_DEBUG, " AT_SELECTED_VERSION %d",
- data->selected_version);
- eap_sim_msg_add(msg, EAP_SIM_AT_SELECTED_VERSION,
- data->selected_version, NULL, 0);
+ if (!data->reauth) {
+ wpa_hexdump(MSG_DEBUG, " AT_NONCE_MT",
+ data->nonce_mt, EAP_SIM_NONCE_MT_LEN);
+ eap_sim_msg_add(msg, EAP_SIM_AT_NONCE_MT, 0,
+ data->nonce_mt, EAP_SIM_NONCE_MT_LEN);
+ wpa_printf(MSG_DEBUG, " AT_SELECTED_VERSION %d",
+ data->selected_version);
+ eap_sim_msg_add(msg, EAP_SIM_AT_SELECTED_VERSION,
+ data->selected_version, NULL, 0);
+ }
if (identity) {
wpa_hexdump_ascii(MSG_DEBUG, " AT_IDENTITY",
Modified: wpasupplicant/trunk/src/eap_peer/eap_ttls.c
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/src/eap_peer/eap_ttls.c?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/src/eap_peer/eap_ttls.c (original)
+++ wpasupplicant/trunk/src/eap_peer/eap_ttls.c Wed Feb 6 05:37:54 2008
@@ -1769,12 +1769,12 @@
}
#endif /* EAP_TNC */
}
- } else if (data->ttls_version == 0 && sm->workaround &&
+ } else if (data->ttls_version == 0 &&
ret->methodState == METHOD_MAY_CONT &&
(ret->decision == DECISION_UNCOND_SUCC ||
ret->decision == DECISION_COND_SUCC)) {
wpa_printf(MSG_DEBUG, "EAP-TTLS: Authentication "
- "completed successfully (EAP workaround)");
+ "completed successfully (MAY_CONT)");
data->phase2_success = 1;
}
}
Modified: wpasupplicant/trunk/src/eap_server/eap_aka.c
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/src/eap_server/eap_aka.c?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/src/eap_server/eap_aka.c (original)
+++ wpasupplicant/trunk/src/eap_server/eap_aka.c Wed Feb 6 05:37:54 2008
@@ -1,6 +1,6 @@
/*
* hostapd / EAP-AKA (RFC 4187)
- * Copyright (c) 2005-2007, Jouni Malinen <j at w1.fi>
+ * Copyright (c) 2005-2008, Jouni Malinen <j at w1.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
@@ -219,6 +219,14 @@
sm->identity_len)) {
wpa_printf(MSG_DEBUG, " AT_PERMANENT_ID_REQ");
eap_sim_msg_add(msg, EAP_SIM_AT_PERMANENT_ID_REQ, 0, NULL, 0);
+ } else {
+ /*
+ * RFC 4187, Chap. 4.1.4 recommends that identity from EAP is
+ * ignored and the AKA/Identity is used to request the
+ * identity.
+ */
+ wpa_printf(MSG_DEBUG, " AT_ANY_ID_REQ");
+ eap_sim_msg_add(msg, EAP_SIM_AT_ANY_ID_REQ, 0, NULL, 0);
}
buf = eap_sim_msg_finish(msg, NULL, NULL, 0);
if (eap_aka_add_id_msg(data, buf) < 0) {
@@ -373,24 +381,27 @@
wpa_printf(MSG_DEBUG, "EAP-AKA: Generating Notification");
msg = eap_sim_msg_init(EAP_CODE_REQUEST, id, EAP_TYPE_AKA,
EAP_AKA_SUBTYPE_NOTIFICATION);
- wpa_printf(MSG_DEBUG, " AT_NOTIFICATION");
+ wpa_printf(MSG_DEBUG, " AT_NOTIFICATION (%d)", data->notification);
eap_sim_msg_add(msg, EAP_SIM_AT_NOTIFICATION, data->notification,
NULL, 0);
if (data->use_result_ind) {
- wpa_printf(MSG_DEBUG, " AT_IV");
- wpa_printf(MSG_DEBUG, " AT_ENCR_DATA");
- eap_sim_msg_add_encr_start(msg, EAP_SIM_AT_IV,
- EAP_SIM_AT_ENCR_DATA);
- wpa_printf(MSG_DEBUG, " *AT_COUNTER (%u)", data->counter);
- eap_sim_msg_add(msg, EAP_SIM_AT_COUNTER, data->counter, NULL,
- 0);
-
- if (eap_sim_msg_add_encr_end(msg, data->k_encr,
- EAP_SIM_AT_PADDING)) {
- wpa_printf(MSG_WARNING, "EAP-AKA: Failed to encrypt "
- "AT_ENCR_DATA");
- eap_sim_msg_free(msg);
- return NULL;
+ if (data->reauth) {
+ wpa_printf(MSG_DEBUG, " AT_IV");
+ wpa_printf(MSG_DEBUG, " AT_ENCR_DATA");
+ eap_sim_msg_add_encr_start(msg, EAP_SIM_AT_IV,
+ EAP_SIM_AT_ENCR_DATA);
+ wpa_printf(MSG_DEBUG, " *AT_COUNTER (%u)",
+ data->counter);
+ eap_sim_msg_add(msg, EAP_SIM_AT_COUNTER, data->counter,
+ NULL, 0);
+
+ if (eap_sim_msg_add_encr_end(msg, data->k_encr,
+ EAP_SIM_AT_PADDING)) {
+ wpa_printf(MSG_WARNING, "EAP-AKA: Failed to "
+ "encrypt AT_ENCR_DATA");
+ eap_sim_msg_free(msg);
+ return NULL;
+ }
}
wpa_printf(MSG_DEBUG, " AT_MAC");
@@ -576,10 +587,16 @@
sm->method_pending = METHOD_PENDING_NONE;
}
+ identity_len = sm->identity_len;
+ while (identity_len > 0 && sm->identity[identity_len - 1] == '\0') {
+ wpa_printf(MSG_DEBUG, "EAP-AKA: Workaround - drop last null "
+ "character from identity");
+ identity_len--;
+ }
wpa_hexdump_ascii(MSG_DEBUG, "EAP-AKA: Identity for MK derivation",
- sm->identity, sm->identity_len);
-
- eap_aka_derive_mk(sm->identity, sm->identity_len, data->ik, data->ck,
+ sm->identity, identity_len);
+
+ eap_aka_derive_mk(sm->identity, identity_len, data->ik, data->ck,
data->mk);
eap_sim_derive_keys(data->mk, data->k_encr, data->k_aut, data->msk,
data->emsk);
@@ -834,7 +851,10 @@
{
wpa_printf(MSG_DEBUG, "EAP-AKA: Client reported error %d",
attr->client_error_code);
- eap_aka_state(data, FAILURE);
+ if (data->notification == EAP_SIM_SUCCESS && data->use_result_ind)
+ eap_aka_state(data, SUCCESS);
+ else
+ eap_aka_state(data, FAILURE);
}
Modified: wpasupplicant/trunk/src/eap_server/eap_fast.c
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/src/eap_server/eap_fast.c?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/src/eap_server/eap_fast.c (original)
+++ wpasupplicant/trunk/src/eap_server/eap_fast.c Wed Feb 6 05:37:54 2008
@@ -1,6 +1,6 @@
/*
* EAP-FAST server (RFC 4851)
- * Copyright (c) 2004-2007, Jouni Malinen <j at w1.fi>
+ * Copyright (c) 2004-2008, Jouni Malinen <j at w1.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
@@ -70,6 +70,7 @@
int anon_provisioning;
int send_new_pac; /* server triggered re-keying of Tunnel PAC */
+ struct wpabuf *pending_phase2_resp;
};
@@ -515,6 +516,7 @@
eap_server_tls_ssl_deinit(sm, &data->ssl);
os_free(data->srv_id);
os_free(data->key_block_p);
+ wpabuf_free(data->pending_phase2_resp);
os_free(data);
}
@@ -665,6 +667,11 @@
{
struct wpabuf *req;
+ if (data->phase2_priv == NULL) {
+ wpa_printf(MSG_DEBUG, "EAP-FAST: Phase 2 method not "
+ "initialized");
+ return NULL;
+ }
req = data->phase2_method->buildReq(sm, data->phase2_priv, id);
if (req == NULL)
return NULL;
@@ -1341,7 +1348,7 @@
int check_crypto_binding = data->state == CRYPTO_BINDING;
if (eap_fast_parse_tlvs(in_data, in_len, &tlv) < 0) {
- wpa_printf(MSG_DEBUG, "EAP-FAST: Failed to parse receivede "
+ wpa_printf(MSG_DEBUG, "EAP-FAST: Failed to parse received "
"Phase 2 TLVs");
return;
}
@@ -1447,6 +1454,17 @@
wpa_printf(MSG_DEBUG, "EAP-FAST: Received %lu bytes encrypted data for"
" Phase 2", (unsigned long) in_len);
+ if (data->pending_phase2_resp) {
+ wpa_printf(MSG_DEBUG, "EAP-PEAP: Pending Phase 2 response - "
+ "skip decryption and use old data");
+ eap_fast_process_phase2_tlvs(
+ sm, data, wpabuf_mhead(data->pending_phase2_resp),
+ wpabuf_len(data->pending_phase2_resp));
+ wpabuf_free(data->pending_phase2_resp);
+ data->pending_phase2_resp = NULL;
+ return;
+ }
+
/* FIX: get rid of const -> non-const typecast */
res = eap_server_tls_data_reassemble(sm, &data->ssl, (u8 **) &in_data,
&in_len);
@@ -1484,6 +1502,14 @@
in_decrypted, len_decrypted);
eap_fast_process_phase2_tlvs(sm, data, in_decrypted, len_decrypted);
+
+ if (sm->method_pending == METHOD_PENDING_WAIT) {
+ wpa_printf(MSG_DEBUG, "EAP-FAST: Phase2 method is in "
+ "pending wait state - save decrypted response");
+ wpabuf_free(data->pending_phase2_resp);
+ data->pending_phase2_resp = wpabuf_alloc_copy(in_decrypted,
+ len_decrypted);
+ }
os_free(in_decrypted);
}
Modified: wpasupplicant/trunk/src/eap_server/eap_peap.c
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/src/eap_server/eap_peap.c?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/src/eap_server/eap_peap.c (original)
+++ wpasupplicant/trunk/src/eap_server/eap_peap.c Wed Feb 6 05:37:54 2008
@@ -1,6 +1,6 @@
/*
* hostapd / EAP-PEAP (draft-josefsson-pppext-eap-tls-eap-07.txt)
- * Copyright (c) 2004-2007, Jouni Malinen <j at w1.fi>
+ * Copyright (c) 2004-2008, Jouni Malinen <j at w1.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
@@ -42,6 +42,7 @@
const struct eap_method *phase2_method;
void *phase2_priv;
int force_version;
+ struct wpabuf *pending_phase2_resp;
};
@@ -159,6 +160,7 @@
if (data->phase2_priv && data->phase2_method)
data->phase2_method->reset(sm, data->phase2_priv);
eap_server_tls_ssl_deinit(sm, &data->ssl);
+ wpabuf_free(data->pending_phase2_resp);
os_free(data);
}
@@ -405,9 +407,15 @@
data->phase2_method->process(sm, data->phase2_priv, in_data);
+ if (sm->method_pending == METHOD_PENDING_WAIT) {
+ wpa_printf(MSG_DEBUG, "EAP-PEAP: Phase2 method is in "
+ "pending wait state - save decrypted response");
+ wpabuf_free(data->pending_phase2_resp);
+ data->pending_phase2_resp = wpabuf_dup(in_data);
+ }
+
if (!data->phase2_method->isDone(sm, data->phase2_priv))
return;
-
if (!data->phase2_method->isSuccess(sm, data->phase2_priv)) {
wpa_printf(MSG_DEBUG, "EAP-PEAP: Phase2 method failed");
@@ -467,6 +475,16 @@
wpa_printf(MSG_DEBUG, "EAP-PEAP: received %lu bytes encrypted data for"
" Phase 2", (unsigned long) in_len);
+
+ if (data->pending_phase2_resp) {
+ wpa_printf(MSG_DEBUG, "EAP-PEAP: Pending Phase 2 response - "
+ "skip decryption and use old data");
+ eap_peap_process_phase2_response(sm, data,
+ data->pending_phase2_resp);
+ wpabuf_free(data->pending_phase2_resp);
+ data->pending_phase2_resp = NULL;
+ return;
+ }
/* FIX: get rid of const -> non-const typecast */
res = eap_server_tls_data_reassemble(sm, &data->ssl, (u8 **) &in_data,
Modified: wpasupplicant/trunk/src/eap_server/eap_sim.c
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/src/eap_server/eap_sim.c?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/src/eap_server/eap_sim.c (original)
+++ wpasupplicant/trunk/src/eap_server/eap_sim.c Wed Feb 6 05:37:54 2008
@@ -1,6 +1,6 @@
/*
* hostapd / EAP-SIM (RFC 4186)
- * Copyright (c) 2005-2007, Jouni Malinen <j at w1.fi>
+ * Copyright (c) 2005-2008, Jouni Malinen <j at w1.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
@@ -114,6 +114,13 @@
sm->identity_len)) {
wpa_printf(MSG_DEBUG, " AT_PERMANENT_ID_REQ");
eap_sim_msg_add(msg, EAP_SIM_AT_PERMANENT_ID_REQ, 0, NULL, 0);
+ } else {
+ /*
+ * RFC 4186, Chap. 4.2.4 recommends that identity from EAP is
+ * ignored and the SIM/Start is used to request the identity.
+ */
+ wpa_printf(MSG_DEBUG, " AT_ANY_ID_REQ");
+ eap_sim_msg_add(msg, EAP_SIM_AT_ANY_ID_REQ, 0, NULL, 0);
}
wpa_printf(MSG_DEBUG, " AT_VERSION_LIST");
ver[0] = 0;
@@ -264,24 +271,27 @@
wpa_printf(MSG_DEBUG, "EAP-SIM: Generating Notification");
msg = eap_sim_msg_init(EAP_CODE_REQUEST, id, EAP_TYPE_SIM,
EAP_SIM_SUBTYPE_NOTIFICATION);
- wpa_printf(MSG_DEBUG, " AT_NOTIFICATION");
+ wpa_printf(MSG_DEBUG, " AT_NOTIFICATION (%d)", data->notification);
eap_sim_msg_add(msg, EAP_SIM_AT_NOTIFICATION, data->notification,
NULL, 0);
if (data->use_result_ind) {
- wpa_printf(MSG_DEBUG, " AT_IV");
- wpa_printf(MSG_DEBUG, " AT_ENCR_DATA");
- eap_sim_msg_add_encr_start(msg, EAP_SIM_AT_IV,
- EAP_SIM_AT_ENCR_DATA);
- wpa_printf(MSG_DEBUG, " *AT_COUNTER (%u)", data->counter);
- eap_sim_msg_add(msg, EAP_SIM_AT_COUNTER, data->counter, NULL,
- 0);
-
- if (eap_sim_msg_add_encr_end(msg, data->k_encr,
- EAP_SIM_AT_PADDING)) {
- wpa_printf(MSG_WARNING, "EAP-SIM: Failed to encrypt "
- "AT_ENCR_DATA");
- eap_sim_msg_free(msg);
- return NULL;
+ if (data->reauth) {
+ wpa_printf(MSG_DEBUG, " AT_IV");
+ wpa_printf(MSG_DEBUG, " AT_ENCR_DATA");
+ eap_sim_msg_add_encr_start(msg, EAP_SIM_AT_IV,
+ EAP_SIM_AT_ENCR_DATA);
+ wpa_printf(MSG_DEBUG, " *AT_COUNTER (%u)",
+ data->counter);
+ eap_sim_msg_add(msg, EAP_SIM_AT_COUNTER, data->counter,
+ NULL, 0);
+
+ if (eap_sim_msg_add_encr_end(msg, data->k_encr,
+ EAP_SIM_AT_PADDING)) {
+ wpa_printf(MSG_WARNING, "EAP-SIM: Failed to "
+ "encrypt AT_ENCR_DATA");
+ eap_sim_msg_free(msg);
+ return NULL;
+ }
}
wpa_printf(MSG_DEBUG, " AT_MAC");
@@ -386,20 +396,6 @@
u8 ver_list[2];
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);
@@ -454,6 +450,20 @@
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;
@@ -474,12 +484,18 @@
return;
}
+ identity_len = sm->identity_len;
+ while (identity_len > 0 && sm->identity[identity_len - 1] == '\0') {
+ wpa_printf(MSG_DEBUG, "EAP-SIM: Workaround - drop last null "
+ "character from identity");
+ identity_len--;
+ }
wpa_hexdump_ascii(MSG_DEBUG, "EAP-SIM: Identity for MK derivation",
- sm->identity, sm->identity_len);
+ sm->identity, identity_len);
os_memcpy(data->nonce_mt, attr->nonce_mt, EAP_SIM_NONCE_MT_LEN);
WPA_PUT_BE16(ver_list, EAP_SIM_VERSION);
- eap_sim_derive_mk(sm->identity, sm->identity_len, attr->nonce_mt,
+ eap_sim_derive_mk(sm->identity, identity_len, attr->nonce_mt,
attr->selected_version, ver_list, sizeof(ver_list),
data->num_chal, (const u8 *) data->kc, data->mk);
eap_sim_derive_keys(data->mk, data->k_encr, data->k_aut, data->msk,
@@ -637,7 +653,10 @@
{
wpa_printf(MSG_DEBUG, "EAP-SIM: Client reported error %d",
attr->client_error_code);
- eap_sim_state(data, FAILURE);
+ if (data->notification == EAP_SIM_SUCCESS && data->use_result_ind)
+ eap_sim_state(data, SUCCESS);
+ else
+ eap_sim_state(data, FAILURE);
}
Modified: wpasupplicant/trunk/src/eap_server/eap_sim_db.c
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/src/eap_server/eap_sim_db.c?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/src/eap_server/eap_sim_db.c (original)
+++ wpasupplicant/trunk/src/eap_server/eap_sim_db.c Wed Feb 6 05:37:54 2008
@@ -555,8 +555,7 @@
size_t i;
char msg[40];
- if (identity_len < 2 || identity[0] != EAP_SIM_PERMANENT_PREFIX ||
- identity_len + 1 > sizeof(entry->imsi)) {
+ if (identity_len < 2 || identity[0] != EAP_SIM_PERMANENT_PREFIX) {
wpa_hexdump_ascii(MSG_DEBUG, "EAP-SIM DB: unexpected identity",
identity, identity_len);
return EAP_SIM_DB_FAILURE;
@@ -568,6 +567,11 @@
identity_len = i;
break;
}
+ }
+ if (identity_len + 1 > sizeof(entry->imsi)) {
+ wpa_hexdump_ascii(MSG_DEBUG, "EAP-SIM DB: unexpected identity",
+ identity, identity_len);
+ return EAP_SIM_DB_FAILURE;
}
wpa_hexdump_ascii(MSG_DEBUG, "EAP-SIM DB: Get GSM triplets for IMSI",
identity, identity_len);
@@ -1119,8 +1123,7 @@
char msg[40];
if (identity_len < 2 || identity == NULL ||
- identity[0] != EAP_AKA_PERMANENT_PREFIX ||
- identity_len + 1 > sizeof(entry->imsi)) {
+ identity[0] != EAP_AKA_PERMANENT_PREFIX) {
wpa_hexdump_ascii(MSG_DEBUG, "EAP-SIM DB: unexpected identity",
identity, identity_len);
return EAP_SIM_DB_FAILURE;
@@ -1132,6 +1135,11 @@
identity_len = i;
break;
}
+ }
+ if (identity_len + 1 > sizeof(entry->imsi)) {
+ wpa_hexdump_ascii(MSG_DEBUG, "EAP-SIM DB: unexpected identity",
+ identity, identity_len);
+ return EAP_SIM_DB_FAILURE;
}
wpa_hexdump_ascii(MSG_DEBUG, "EAP-SIM DB: Get AKA auth for IMSI",
identity, identity_len);
@@ -1215,23 +1223,37 @@
const u8 *_rand)
{
struct eap_sim_db_data *data = priv;
-
- if (identity_len < 2 || identity[0] != EAP_AKA_PERMANENT_PREFIX ||
- identity_len > 20) {
+ size_t i;
+
+ if (identity_len < 2 || identity == NULL ||
+ identity[0] != EAP_AKA_PERMANENT_PREFIX) {
wpa_hexdump_ascii(MSG_DEBUG, "EAP-SIM DB: unexpected identity",
identity, identity_len);
return -1;
}
+ identity++;
+ identity_len--;
+ for (i = 0; i < identity_len; i++) {
+ if (identity[i] == '@') {
+ identity_len = i;
+ break;
+ }
+ }
+ if (identity_len > 20) {
+ wpa_hexdump_ascii(MSG_DEBUG, "EAP-SIM DB: unexpected identity",
+ identity, identity_len);
+ return -1;
+ }
if (data->sock >= 0) {
char msg[100];
int len, ret;
len = os_snprintf(msg, sizeof(msg), "AKA-AUTS ");
- if (len < 0 || len + identity_len - 1 >= sizeof(msg))
+ if (len < 0 || len + identity_len >= sizeof(msg))
return -1;
- os_memcpy(msg + len, identity + 1, identity_len - 1);
- len += identity_len - 1;
+ os_memcpy(msg + len, identity, identity_len);
+ len += identity_len;
ret = os_snprintf(msg + len, sizeof(msg) - len, " ");
if (ret < 0 || (size_t) ret >= sizeof(msg) - len)
@@ -1246,7 +1268,7 @@
len += wpa_snprintf_hex(msg + len, sizeof(msg) - len,
_rand, EAP_AKA_RAND_LEN);
wpa_hexdump(MSG_DEBUG, "EAP-SIM DB: reporting AKA AUTS for "
- "IMSI", identity + 1, identity_len - 1);
+ "IMSI", identity, identity_len);
if (eap_sim_db_send(data, msg, len) < 0)
return -1;
}
Modified: wpasupplicant/trunk/src/eap_server/eap_ttls.c
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/src/eap_server/eap_ttls.c?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/src/eap_server/eap_ttls.c (original)
+++ wpasupplicant/trunk/src/eap_server/eap_ttls.c Wed Feb 6 05:37:54 2008
@@ -1,6 +1,6 @@
/*
* hostapd / EAP-TTLS (draft-ietf-pppext-eap-ttls-05.txt)
- * Copyright (c) 2004-2007, Jouni Malinen <j at w1.fi>
+ * Copyright (c) 2004-2008, Jouni Malinen <j at w1.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
@@ -54,6 +54,7 @@
u8 mschapv2_auth_response[20];
u8 mschapv2_ident;
int tls_ia_configured;
+ struct wpabuf *pending_phase2_eap_resp;
};
@@ -416,6 +417,7 @@
if (data->phase2_priv && data->phase2_method)
data->phase2_method->reset(sm, data->phase2_priv);
eap_server_tls_ssl_deinit(sm, &data->ssl);
+ wpabuf_free(data->pending_phase2_eap_resp);
os_free(data);
}
@@ -1037,6 +1039,13 @@
}
m->process(sm, priv, &buf);
+
+ if (sm->method_pending == METHOD_PENDING_WAIT) {
+ wpa_printf(MSG_DEBUG, "EAP-TTLS/EAP: Phase2 method is in "
+ "pending wait state - save decrypted response");
+ wpabuf_free(data->pending_phase2_eap_resp);
+ data->pending_phase2_eap_resp = wpabuf_dup(&buf);
+ }
if (!m->isDone(sm, priv))
return;
@@ -1148,6 +1157,17 @@
wpa_printf(MSG_DEBUG, "EAP-TTLS: received %lu bytes encrypted data for"
" Phase 2", (unsigned long) in_len);
+ if (data->pending_phase2_eap_resp) {
+ wpa_printf(MSG_DEBUG, "EAP-TTLS: Pending Phase 2 EAP response "
+ "- skip decryption and use old data");
+ eap_ttls_process_phase2_eap(
+ sm, data, wpabuf_head(data->pending_phase2_eap_resp),
+ wpabuf_len(data->pending_phase2_eap_resp));
+ wpabuf_free(data->pending_phase2_eap_resp);
+ data->pending_phase2_eap_resp = NULL;
+ return;
+ }
+
res = eap_server_tls_data_reassemble(sm, &data->ssl, &in_data,
&in_len);
if (res < 0 || res == 1)
Modified: wpasupplicant/trunk/src/eapol_supp/eapol_supp_sm.c
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/src/eapol_supp/eapol_supp_sm.c?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/src/eapol_supp/eapol_supp_sm.c (original)
+++ wpasupplicant/trunk/src/eapol_supp/eapol_supp_sm.c Wed Feb 6 05:37:54 2008
@@ -670,7 +670,7 @@
hdr->version, hdr->type, be_to_host16(hdr->length),
key->type, rx_key_length, key->key_index);
- eapol_sm_notify_lower_layer_success(sm);
+ eapol_sm_notify_lower_layer_success(sm, 1);
sign_key_len = IEEE8021X_SIGN_KEY_LEN;
encr_key_len = IEEE8021X_ENCR_KEY_LEN;
res = eapol_sm_get_key(sm, (u8 *) &keydata, sizeof(keydata));
@@ -1373,14 +1373,24 @@
const u8 *eap_key;
size_t eap_len;
- if (sm == NULL || !eap_key_available(sm->eap))
+ if (sm == NULL || !eap_key_available(sm->eap)) {
+ wpa_printf(MSG_DEBUG, "EAPOL: EAP key not available");
return -1;
+ }
eap_key = eap_get_eapKeyData(sm->eap, &eap_len);
- if (eap_key == NULL)
+ if (eap_key == NULL) {
+ wpa_printf(MSG_DEBUG, "EAPOL: Failed to get eapKeyData");
return -1;
- if (len > eap_len)
+ }
+ if (len > eap_len) {
+ wpa_printf(MSG_DEBUG, "EAPOL: Requested key length (%lu) not "
+ "available (len=%lu)",
+ (unsigned long) len, (unsigned long) eap_len);
return eap_len;
+ }
os_memcpy(key, eap_key, len);
+ wpa_printf(MSG_DEBUG, "EAPOL: Successfully fetched key (len=%lu)",
+ (unsigned long) len);
return 0;
}
@@ -1550,17 +1560,20 @@
/**
* eapol_sm_notify_lower_layer_success - Notification of lower layer success
* @sm: Pointer to EAPOL state machine allocated with eapol_sm_init()
+ * @in_eapol_sm: Whether the caller is already running inside EAPOL state
+ * machine loop (eapol_sm_step())
*
* Notify EAPOL (and EAP) state machines that a lower layer has detected a
* successful authentication. This is used to recover from dropped EAP-Success
* messages.
*/
-void eapol_sm_notify_lower_layer_success(struct eapol_sm *sm)
+void eapol_sm_notify_lower_layer_success(struct eapol_sm *sm, int in_eapol_sm)
{
if (sm == NULL)
return;
eap_notify_lower_layer_success(sm->eap);
- eapol_sm_step(sm);
+ if (!in_eapol_sm)
+ eapol_sm_step(sm);
}
Modified: wpasupplicant/trunk/src/eapol_supp/eapol_supp_sm.h
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/src/eapol_supp/eapol_supp_sm.h?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/src/eapol_supp/eapol_supp_sm.h (original)
+++ wpasupplicant/trunk/src/eapol_supp/eapol_supp_sm.h Wed Feb 6 05:37:54 2008
@@ -241,7 +241,7 @@
void eapol_sm_notify_ctrl_attached(struct eapol_sm *sm);
void eapol_sm_notify_ctrl_response(struct eapol_sm *sm);
void eapol_sm_request_reauth(struct eapol_sm *sm);
-void eapol_sm_notify_lower_layer_success(struct eapol_sm *sm);
+void eapol_sm_notify_lower_layer_success(struct eapol_sm *sm, int in_eapol_sm);
void eapol_sm_invalidate_cached_session(struct eapol_sm *sm);
#else /* IEEE8021X_EAPOL */
static inline struct eapol_sm *eapol_sm_init(struct eapol_ctx *ctx)
@@ -323,7 +323,8 @@
static inline void eapol_sm_request_reauth(struct eapol_sm *sm)
{
}
-static inline void eapol_sm_notify_lower_layer_success(struct eapol_sm *sm)
+static inline void eapol_sm_notify_lower_layer_success(struct eapol_sm *sm,
+ int in_eapol_sm)
{
}
static inline void eapol_sm_invalidate_cached_session(struct eapol_sm *sm)
Modified: wpasupplicant/trunk/src/rsn_supp/wpa.c
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/src/rsn_supp/wpa.c?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/src/rsn_supp/wpa.c (original)
+++ wpasupplicant/trunk/src/rsn_supp/wpa.c Wed Feb 6 05:37:54 2008
@@ -1447,7 +1447,7 @@
}
wpa_eapol_key_dump(key);
- eapol_sm_notify_lower_layer_success(sm->eapol);
+ eapol_sm_notify_lower_layer_success(sm->eapol, 0);
wpa_hexdump(MSG_MSGDUMP, "WPA: RX EAPOL-Key", tmp, len);
if (data_len < len) {
wpa_printf(MSG_DEBUG, "WPA: ignoring %lu bytes after the IEEE "
Modified: wpasupplicant/trunk/src/tls/x509v3.c
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/src/tls/x509v3.c?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/src/tls/x509v3.c (original)
+++ wpasupplicant/trunk/src/tls/x509v3.c Wed Feb 6 05:37:54 2008
@@ -1567,6 +1567,14 @@
&cert->next->subject) != 0) {
wpa_printf(MSG_DEBUG, "X509: Certificate "
"chain issuer name mismatch");
+ x509_name_string(&cert->issuer, buf,
+ sizeof(buf));
+ wpa_printf(MSG_DEBUG, "X509: cert issuer: %s",
+ buf);
+ x509_name_string(&cert->next->subject, buf,
+ sizeof(buf));
+ wpa_printf(MSG_DEBUG, "X509: next cert "
+ "subject: %s", buf);
*reason = X509_VALIDATE_CERTIFICATE_UNKNOWN;
return -1;
}
Modified: wpasupplicant/trunk/wpa_supplicant/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/wpa_supplicant/ChangeLog?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/wpa_supplicant/ChangeLog (original)
+++ wpasupplicant/trunk/wpa_supplicant/ChangeLog Wed Feb 6 05:37:54 2008
@@ -19,6 +19,10 @@
* added new ctrl_iface command, BSS, to allow scan results to be
fetched without hitting the message size limits (this command
can be used to iterate through the scan results one BSS at the time)
+ * fixed EAP-SIM not to include AT_NONCE_MT and AT_SELECTED_VERSION
+ attributes in EAP-SIM Start/Response when using fast reauthentication
+ * fixed EAPOL not to end up in infinite loop when processing dynamic
+ WEP keys with IEEE 802.1X
2008-01-01 - v0.6.2
* added support for Makefile builds to include debug-log-to-a-file
Modified: wpasupplicant/trunk/wpa_supplicant/ctrl_iface.c
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/wpa_supplicant/ctrl_iface.c?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/wpa_supplicant/ctrl_iface.c (original)
+++ wpasupplicant/trunk/wpa_supplicant/ctrl_iface.c Wed Feb 6 05:37:54 2008
@@ -1226,8 +1226,6 @@
size_t buflen)
{
u8 bssid[ETH_ALEN];
- int next = 0;
- int first = 0;
size_t i;
struct wpa_scan_results *results;
struct wpa_scan_res *bss;
@@ -1235,34 +1233,20 @@
char *pos, *end;
const u8 *ie, *ie2;
- if (os_strcmp(cmd, "first") == 0) {
- first = 1;
- } else if (os_strncmp(cmd, "next ", 5) == 0) {
- next = 1;
- if (hwaddr_aton(cmd + 5, bssid))
- return -1;
- } else {
- if (hwaddr_aton(cmd, bssid))
- return -1;
- }
-
results = wpa_s->scan_res;
if (results == NULL)
return 0;
- for (i = 0; i < results->num; i++) {
- if (first)
- break;
-
- if (os_memcmp(bssid, results->res[i]->bssid, ETH_ALEN) == 0) {
- if (next)
- first = 1; /* pick next */
- else
+ if (hwaddr_aton(cmd, bssid) == 0) {
+ for (i = 0; i < results->num; i++) {
+ if (os_memcmp(bssid, results->res[i]->bssid, ETH_ALEN)
+ == 0)
break;
}
- }
-
- if (i >= results->num)
+ } else
+ i = atoi(cmd);
+
+ if (i >= results->num || results->res[i] == NULL)
return 0; /* no match found */
bss = results->res[i];
@@ -1279,7 +1263,8 @@
"tsf=%016llu\n"
"ie=",
MAC2STR(bss->bssid), bss->freq, bss->beacon_int,
- bss->caps, bss->qual, bss->noise, bss->level, bss->tsf);
+ bss->caps, bss->qual, bss->noise, bss->level,
+ (unsigned long long) bss->tsf);
if (ret < 0 || ret >= end - pos)
return pos - buf;
pos += ret;
Modified: wpasupplicant/trunk/wpa_supplicant/doc/ctrl_iface.doxygen
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/wpa_supplicant/doc/ctrl_iface.doxygen?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/wpa_supplicant/doc/ctrl_iface.doxygen (original)
+++ wpasupplicant/trunk/wpa_supplicant/doc/ctrl_iface.doxygen Wed Feb 6 05:37:54 2008
@@ -293,12 +293,11 @@
avoids problems with large number of scan results not fitting in the
ctrl_iface messages.
-There are three subcommands for the \c BSS command: "BSS first"
-requests information for the first BSS in the scan results table, "BSS
-<BSSID>" requests information for the given BSS (based on BSSID in
-00:01:02:03:04:05 format), and "BSS next <previous BSSID>" requests
-information for the BSS following the specified BSS (to allow
-iteration through the scan results).
+There are two options for selecting the BSS with the \c BSS command:
+"BSS <idx>" requests information for the BSS identified by the index
+(0 .. size-1) in the scan results table and "BSS <BSSID>" requests
+information for the given BSS (based on BSSID in 00:01:02:03:04:05
+format).
BSS information is presented in following format. Please note that new
fields may be added to this field=value data, so the ctrl_iface user
Modified: wpasupplicant/trunk/wpa_supplicant/eap_testing.txt
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/wpa_supplicant/eap_testing.txt?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/wpa_supplicant/eap_testing.txt (original)
+++ wpasupplicant/trunk/wpa_supplicant/eap_testing.txt Wed Feb 6 05:37:54 2008
@@ -58,7 +58,9 @@
EAP-PEAPv0/GTC + - + - + + + + - - + +
EAP-PEAPv0/OTP - - - - - + - - - - - -
EAP-PEAPv0/MD5 + - - + + + + + - - + -
-EAP-PEAPv0/TLS + + - + + + F + - - - -
+EAP-PEAPv0/TLS + + - + + + F + - - + -
+EAP-PEAPv0/SIM - - - - - - - - - - + -
+EAP-PEAPv0/AKA - - - - - - - - - - + -
EAP-PEAPv0/PSK - - - - - - - - - - + -
EAP-PEAPv0/PAX - - - - - - - - - - + -
EAP-PEAPv0/SAKE - - - - - - - - - - + -
@@ -67,7 +69,9 @@
EAP-PEAPv1/GTC - - + + + +1 + +5 +8 - + +
EAP-PEAPv1/OTP - - - - - +1 - - - - - -
EAP-PEAPv1/MD5 - - - + + +1 + +5 - - + -
-EAP-PEAPv1/TLS - - - + + +1 F +5 - - - -
+EAP-PEAPv1/TLS - - - + + +1 F +5 - - + -
+EAP-PEAPv1/SIM - - - - - - - - - - + -
+EAP-PEAPv1/AKA - - - - - - - - - - + -
EAP-PEAPv1/PSK - - - - - - - - - - + -
EAP-PEAPv1/PAX - - - - - - - - - - + -
EAP-PEAPv1/SAKE - - - - - - - - - - + -
@@ -80,7 +84,9 @@
EAP-TTLS/EAP-GTC + - +2 ? + + + + - - + -
EAP-TTLS/EAP-OTP - - - - - + - - - - - -
EAP-TTLS/EAP-MSCHAPv2 + - +2 + + + + + + - + -
-EAP-TTLS/EAP-TLS + - +2 + F + + + - - - -
+EAP-TTLS/EAP-TLS + - +2 + F + + + - - + -
+EAP-TTLS/EAP-SIM - - - - - - - - - - + -
+EAP-TTLS/EAP-AKA - - - - - - - - - - + -
EAP-TTLS/EAP-PSK - - - - - - - - - - + -
EAP-TTLS/EAP-PAX - - - - - - - - - - + -
EAP-TTLS/EAP-SAKE - - - - - - - - - - + -
@@ -95,9 +101,15 @@
EAP-FAST/GTC(auth) - - - + - - - - - + + +
EAP-FAST/MSCHAPv2(aprov)- - - - - - - - - - + +
EAP-FAST/GTC(aprov) - - - - - - - - - - + +
-EAP-FAST/TLS(aprov) - - - - - - - - - - - +
+EAP-FAST/MD5(aprov) - - - - - - - - - - + -
+EAP-FAST/TLS(aprov) - - - - - - - - - - + +
+EAP-FAST/SIM(aprov) - - - - - - - - - - + -
+EAP-FAST/AKA(aprov) - - - - - - - - - - + -
EAP-FAST/MSCHAPv2(auth) - - - - - - - - - - + +
-EAP-FAST/TLS(auth) - - - - - - - - - - - +
+EAP-FAST/MD5(auth) - - - - - - - - - - + -
+EAP-FAST/TLS(auth) - - - - - - - - - - + +
+EAP-FAST/SIM(auth) - - - - - - - - - - + -
+EAP-FAST/AKA(auth) - - - - - - - - - - + -
LEAP + - + + + + F +6 - + - +
EAP-TNC +9 - - - - + - - - - - -
EAP-IKEv2 +10 - - - - - - - - - + -
Modified: wpasupplicant/trunk/wpa_supplicant/eapol_test.c
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/wpa_supplicant/eapol_test.c?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/wpa_supplicant/eapol_test.c (original)
+++ wpasupplicant/trunk/wpa_supplicant/eapol_test.c Wed Feb 6 05:37:54 2008
@@ -1008,6 +1008,9 @@
eloop_register_signal_reconfig(eapol_test_terminate, NULL);
eloop_run();
+ eloop_cancel_timeout(eapol_test_timeout, &eapol_test, NULL);
+ eloop_cancel_timeout(eapol_sm_reauth, &eapol_test, NULL);
+
if (eapol_test_compare_pmk(&eapol_test) == 0 ||
eapol_test.no_mppe_keys)
ret = 0;
Modified: wpasupplicant/trunk/wpa_supplicant/todo.txt
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/wpa_supplicant/todo.txt?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/wpa_supplicant/todo.txt (original)
+++ wpasupplicant/trunk/wpa_supplicant/todo.txt Wed Feb 6 05:37:54 2008
@@ -57,12 +57,6 @@
now IMSI is read only after receiving EAP-Identity/Request, but since it is
really needed for all cases, reading IMSI and generating Identity string
could very well be done before EAP has been started
-- test all allowed EAP Phase 2 methods (i.e., anything else than PEAP, TTLS,
- FAST): SIM AKA LEAP; if these work, include in eap_testing.txt; if
- not, either fix or make eap_allowed_phase2_type reject
- (EAP-TTLS/EAP-AKA and EAP-TTLS/EAP-SIM worked fine in wpa_supplicant, but
- hostapd did not support this due to pending data from hlr_auth_gw
- triggering a TLS error)
- try to work around race in receiving association event and first EAPOL
message
- helper function to do memcmp(addr, "\x00\x00\x00\x00\x00\x00", ETH_ALEN)
Modified: wpasupplicant/trunk/wpa_supplicant/wpa_cli.c
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/wpa_supplicant/wpa_cli.c?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/wpa_supplicant/wpa_cli.c (original)
+++ wpasupplicant/trunk/wpa_supplicant/wpa_cli.c Wed Feb 6 05:37:54 2008
@@ -126,7 +126,7 @@
"disconnected\n"
" scan = request new BSS scan\n"
" scan_results = get latest scan results\n"
-" bss <<first> | <bssid> | <next bssid>> = get detailed scan result info\n"
+" bss <<idx> | <bssid>> = get detailed scan result info\n"
" get_capability <eap/pairwise/group/key_mgmt/proto/auth_alg> = "
"get capabilies\n"
" ap_scan <value> = set ap_scan parameter\n"
@@ -900,15 +900,13 @@
char cmd[64];
int res;
- if (argc < 1 || argc > 2) {
- printf("Invalid BSS command: need either one or two "
- "arguments\n");
- return -1;
- }
-
- res = os_snprintf(cmd, sizeof(cmd), "BSS %s%s%s", argv[0],
- (argc == 2) ? " " : "",
- (argc == 2) ? argv[1] : "");
+ if (argc != 1) {
+ printf("Invalid BSS command: need one argument (index or "
+ "BSSID)\n");
+ return -1;
+ }
+
+ res = os_snprintf(cmd, sizeof(cmd), "BSS %s", argv[0]);
if (res < 0 || (size_t) res >= sizeof(cmd))
return -1;
cmd[sizeof(cmd) - 1] = '\0';
Modified: wpasupplicant/trunk/wpa_supplicant/wpa_gui-qt4/scanresults.cpp
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/wpa_supplicant/wpa_gui-qt4/scanresults.cpp?rev=1108&op=diff
==============================================================================
--- wpasupplicant/trunk/wpa_supplicant/wpa_gui-qt4/scanresults.cpp (original)
+++ wpasupplicant/trunk/wpa_supplicant/wpa_gui-qt4/scanresults.cpp Wed Feb 6 05:37:54 2008
@@ -11,8 +11,6 @@
*
* See README and COPYING for more details.
*/
-
-#include <QTimer>
#include "scanresults.h"
#include "wpagui.h"
@@ -58,14 +56,19 @@
{
char reply[2048];
size_t reply_len;
-
+ int index;
+ char cmd[20];
+
scanResultsWidget->clear();
- QString cmd("BSS first");
+ index = 0;
while (wpagui) {
+ snprintf(cmd, sizeof(cmd), "BSS %d", index++);
+ if (index > 1000)
+ break;
+
reply_len = sizeof(reply) - 1;
- if (wpagui->ctrlRequest(cmd.toAscii().constData(), reply,
- &reply_len) < 0)
+ if (wpagui->ctrlRequest(cmd, reply, &reply_len) < 0)
break;
reply[reply_len] = '\0';
@@ -105,9 +108,6 @@
if (bssid.isEmpty())
break;
-
- cmd = "BSS next ";
- cmd.append(bssid);
}
}
More information about the Pkg-wpa-devel
mailing list