aboutsummaryrefslogtreecommitdiffstats
path: root/src/libipsec/ipsec_sa_mgr.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2015-03-27 14:49:38 +0100
committerTobias Brunner <tobias@strongswan.org>2015-05-21 15:38:31 +0200
commit240ad7abf5894bcdcb3756a9f5dae4154de9beae (patch)
treea1005b15909bc4ce31c9d9bd095b8dafbd366cf3 /src/libipsec/ipsec_sa_mgr.c
parent2b51124026dde366449ef5dffd42abe073d3584b (diff)
downloadstrongswan-240ad7abf5894bcdcb3756a9f5dae4154de9beae.tar.bz2
strongswan-240ad7abf5894bcdcb3756a9f5dae4154de9beae.tar.xz
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.
Diffstat (limited to 'src/libipsec/ipsec_sa_mgr.c')
-rw-r--r--src/libipsec/ipsec_sa_mgr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libipsec/ipsec_sa_mgr.c b/src/libipsec/ipsec_sa_mgr.c
index 07ffa9e4f..9d461f2c1 100644
--- a/src/libipsec/ipsec_sa_mgr.c
+++ b/src/libipsec/ipsec_sa_mgr.c
@@ -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;