aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer/eap_sim.c
diff options
context:
space:
mode:
authorSimon Baatz <gmbnomis@gmail.com>2011-12-04 15:17:21 (GMT)
committerJouni Malinen <j@w1.fi>2011-12-04 15:17:21 (GMT)
commit1037235ca0d934c964544bb38f0a646553933a82 (patch)
tree685eba0ece8f4577cdf387de827d3ff5f1a8e067 /src/eap_peer/eap_sim.c
parenta9f40ae720318b77d66c33945138b043d7841d1a (diff)
downloadhostap-1037235ca0d934c964544bb38f0a646553933a82.zip
hostap-1037235ca0d934c964544bb38f0a646553933a82.tar.gz
hostap-1037235ca0d934c964544bb38f0a646553933a82.tar.bz2
EAP-SIM peer: Only log the identities that we actually forget
[Bug 425]
Diffstat (limited to 'src/eap_peer/eap_sim.c')
-rw-r--r--src/eap_peer/eap_sim.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/eap_peer/eap_sim.c b/src/eap_peer/eap_sim.c
index f65802e..06fbc5b 100644
--- a/src/eap_peer/eap_sim.c
+++ b/src/eap_peer/eap_sim.c
@@ -266,21 +266,20 @@ static int eap_sim_supported_ver(int version)
static void eap_sim_clear_identities(struct eap_sim_data *data, int id)
{
- wpa_printf(MSG_DEBUG, "EAP-SIM: forgetting old%s%s%s",
- id & CLEAR_PSEUDONYM ? " pseudonym" : "",
- id & CLEAR_REAUTH_ID ? " reauth_id" : "",
- id & CLEAR_EAP_ID ? " eap_id" : "");
- if (id & CLEAR_PSEUDONYM) {
+ if ((id & CLEAR_PSEUDONYM) && data->pseudonym) {
+ wpa_printf(MSG_DEBUG, "EAP-SIM: forgetting old pseudonym");
os_free(data->pseudonym);
data->pseudonym = NULL;
data->pseudonym_len = 0;
}
- if (id & CLEAR_REAUTH_ID) {
+ if ((id & CLEAR_REAUTH_ID) && data->reauth_id) {
+ wpa_printf(MSG_DEBUG, "EAP-SIM: forgetting old reauth_id");
os_free(data->reauth_id);
data->reauth_id = NULL;
data->reauth_id_len = 0;
}
- if (id & CLEAR_EAP_ID) {
+ if ((id & CLEAR_EAP_ID) && data->last_eap_identity) {
+ wpa_printf(MSG_DEBUG, "EAP-SIM: forgetting old eap_id");
os_free(data->last_eap_identity);
data->last_eap_identity = NULL;
data->last_eap_identity_len = 0;