]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - build-utilities/hostap.git/commitdiff
EAP-AKA peer: Clean up forgetting-id debug prints
authorJouni Malinen <j@w1.fi>
Thu, 16 Feb 2012 21:25:53 +0000 (23:25 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 16 Feb 2012 21:25:53 +0000 (23:25 +0200)
Do not show forgetting of old id values if no value was stored.

Signed-hostap: Jouni Malinen <j@w1.fi>

src/eap_peer/eap_aka.c

index 7e37e44c6e7d2daca8d1747c032fa9743667445d..f30e38d88987224c1d1c646cca7724d8b056e551 100644 (file)
@@ -229,19 +229,19 @@ static int eap_aka_umts_auth(struct eap_sm *sm, struct eap_aka_data *data)
 
 static void eap_aka_clear_identities(struct eap_aka_data *data, int id)
 {
-       if (id & CLEAR_PSEUDONYM) {
+       if ((id & CLEAR_PSEUDONYM) && data->pseudonym) {
                wpa_printf(MSG_DEBUG, "EAP-AKA: 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-AKA: 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-AKA: forgetting old eap_id");
                os_free(data->last_eap_identity);
                data->last_eap_identity = NULL;