aboutsummaryrefslogtreecommitdiffstats
path: root/src/libhydra/plugins/kernel_klips
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2013-07-16 12:00:57 +0200
committerTobias Brunner <tobias@strongswan.org>2013-07-17 17:42:53 +0200
commit0f3ddbd189af5f3582bc4ad7941acbadf26e5bb1 (patch)
treef5cb495e6be46ce05ee8bb5101ac65209485bbb9 /src/libhydra/plugins/kernel_klips
parentbe3c09d020d250606bc8703eb6d357a64c781a0d (diff)
downloadstrongswan-0f3ddbd189af5f3582bc4ad7941acbadf26e5bb1.tar.bz2
strongswan-0f3ddbd189af5f3582bc4ad7941acbadf26e5bb1.tar.xz
linked-list: Remove barely used find_last() method
Diffstat (limited to 'src/libhydra/plugins/kernel_klips')
-rw-r--r--src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c b/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c
index 38c92ce71..82f80fd4c 100644
--- a/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c
+++ b/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c
@@ -2022,7 +2022,7 @@ METHOD(kernel_ipsec_t, add_policy, status_t,
else
{
/* apply the new one, if we have no such policy */
- this->policies->insert_last(this->policies, policy);
+ this->policies->insert_first(this->policies, policy);
}
if (priority == POLICY_PRIORITY_ROUTED)
@@ -2088,7 +2088,8 @@ METHOD(kernel_ipsec_t, add_policy, status_t,
this->mutex->lock(this->mutex);
/* we try to find the policy again and install the route if needed */
- if (this->policies->find_last(this->policies, NULL, (void**)&policy) != SUCCESS)
+ if (this->policies->find_first(this->policies, NULL,
+ (void**)&policy) != SUCCESS)
{
this->mutex->unlock(this->mutex);
DBG2(DBG_KNL, "the policy %R === %R %N is already gone, ignoring",