diff options
author | Martin Willi <martin@strongswan.org> | 2009-10-29 09:49:55 +0100 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2009-11-12 10:34:01 +0100 |
commit | 0107f5b687f00b2729a8ab3af7e9e58429f903dd (patch) | |
tree | b01601b8ef4511d955a0a4c3a0fbc537ac532c83 | |
parent | 2dbac2ab9c4d40c63bd5dc71cbd08d48d6dcd277 (diff) | |
download | strongswan-0107f5b687f00b2729a8ab3af7e9e58429f903dd.tar.bz2 strongswan-0107f5b687f00b2729a8ab3af7e9e58429f903dd.tar.xz |
Fixed replacing existing reauthentication data
-rw-r--r-- | src/charon/plugins/eap_simaka_reauth/eap_simaka_reauth_provider.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/charon/plugins/eap_simaka_reauth/eap_simaka_reauth_provider.c b/src/charon/plugins/eap_simaka_reauth/eap_simaka_reauth_provider.c index a27af54f1..bdc7e7b84 100644 --- a/src/charon/plugins/eap_simaka_reauth/eap_simaka_reauth_provider.c +++ b/src/charon/plugins/eap_simaka_reauth/eap_simaka_reauth_provider.c @@ -124,26 +124,26 @@ static identification_t *gen_reauth(private_eap_simaka_reauth_provider_t *this, identification_t *permanent; data = this->reauth->get(this->reauth, id); - id = id->clone(id); if (data) { /* update existing entry */ permanent = this->permanent->remove(this->permanent, data->id); if (permanent) { - permanent->destroy(permanent); + data->id->destroy(data->id); + data->id = gen_identity(this); + this->permanent->put(this->permanent, data->id, permanent); } - data->id->destroy(data->id); } else { /* generate new entry */ data = malloc_thing(reauth_data_t); data->counter = 0; + data->id = gen_identity(this); + id = id->clone(id); this->reauth->put(this->reauth, id, data); + this->permanent->put(this->permanent, data->id, id); } memcpy(data->mk, mk, HASH_SIZE_SHA1); - data->id = gen_identity(this); - - this->permanent->put(this->permanent, data->id, id); return data->id->clone(data->id); } |