libipsec: Insert SAs first, so latest SA with the same reqid gets used

This was useful for testing purposes of RADIUS accounting, but OS kernels
generally will use the latest SA, so we do the same.
This commit is contained in:
Tobias Brunner
2015-05-21 15:38:31 +02:00
parent 2b51124026
commit 240ad7abf5
+1 -1
View File
@@ -482,7 +482,7 @@ METHOD(ipsec_sa_mgr_t, add_sa, status_t,
entry = create_entry(sa_new);
schedule_expiration(this, entry);
this->sas->insert_last(this->sas, entry);
this->sas->insert_first(this->sas, entry);
this->mutex->unlock(this->mutex);
return SUCCESS;