Send AT_NEXT_PSEUDONYM also if an AT_NEXT_REAUTH_ID is already added.
authorTobias Brunner <tobias@strongswan.org>
Tue, 13 Sep 2011 09:09:07 +0000 (11:09 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 13 Sep 2011 09:09:07 +0000 (11:09 +0200)
src/libcharon/plugins/eap_aka/eap_aka_server.c
src/libcharon/plugins/eap_sim/eap_sim_server.c

index 3dc9c9c..d8e85ce 100644 (file)
@@ -196,15 +196,12 @@ static status_t challenge(private_eap_aka_server_t *this, eap_payload_t **out)
                                                           id->get_encoding(id));
                id->destroy(id);
        }
-       else
+       id = this->mgr->provider_gen_pseudonym(this->mgr, this->permanent);
+       if (id)
        {
-               id = this->mgr->provider_gen_pseudonym(this->mgr, this->permanent);
-               if (id)
-               {
-                       message->add_attribute(message, AT_NEXT_PSEUDONYM,
-                                                                  id->get_encoding(id));
-                       id->destroy(id);
-               }
+               message->add_attribute(message, AT_NEXT_PSEUDONYM,
+                                                          id->get_encoding(id));
+               id->destroy(id);
        }
        *out = eap_payload_create_data_own(message->generate(message, chunk_empty));
        message->destroy(message);
index a6704a7..e0f7e92 100644 (file)
@@ -399,15 +399,12 @@ static status_t process_start(private_eap_sim_server_t *this,
                                                           id->get_encoding(id));
                id->destroy(id);
        }
-       else
+       id = this->mgr->provider_gen_pseudonym(this->mgr, this->permanent);
+       if (id)
        {
-               id = this->mgr->provider_gen_pseudonym(this->mgr, this->permanent);
-               if (id)
-               {
-                       message->add_attribute(message, AT_NEXT_PSEUDONYM,
-                                                                  id->get_encoding(id));
-                       id->destroy(id);
-               }
+               message->add_attribute(message, AT_NEXT_PSEUDONYM,
+                                                          id->get_encoding(id));
+               id->destroy(id);
        }
        *out = eap_payload_create_data_own(message->generate(message, nonce));
        message->destroy(message);