aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/unity/unity_narrow.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2014-10-27 16:16:13 +0100
committerMartin Willi <martin@revosec.ch>2015-02-20 13:34:52 +0100
commitfa42367ca1af350ce11e12daf1d2ed1174d7cfbe (patch)
tree5f5bc6aa68924580f80af4756461bb2f06c9325f /src/libcharon/plugins/unity/unity_narrow.c
parentdb80d0d2dac7da6fc7d81201728de5b870f09d06 (diff)
downloadstrongswan-fa42367ca1af350ce11e12daf1d2ed1174d7cfbe.tar.bz2
strongswan-fa42367ca1af350ce11e12daf1d2ed1174d7cfbe.tar.xz
unity: Reference IKE_SAs by the IKEv1 COOKIEs, improving lookup performance
When handling thousands of IKE_SAs, the unique ID based lookup is rather slow, as we have no indexing.
Diffstat (limited to 'src/libcharon/plugins/unity/unity_narrow.c')
-rw-r--r--src/libcharon/plugins/unity/unity_narrow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcharon/plugins/unity/unity_narrow.c b/src/libcharon/plugins/unity/unity_narrow.c
index 94089563d..227d24be8 100644
--- a/src/libcharon/plugins/unity/unity_narrow.c
+++ b/src/libcharon/plugins/unity/unity_narrow.c
@@ -75,7 +75,7 @@ static void narrow_initiator(private_unity_narrow_t *this, ike_sa_t *ike_sa,
enumerator_t *enumerator;
enumerator = this->handler->create_include_enumerator(this->handler,
- ike_sa->get_unique_id(ike_sa));
+ ike_sa->get_id(ike_sa));
while (enumerator->enumerate(enumerator, &current))
{
if (orig == NULL)
@@ -159,7 +159,7 @@ static bool has_split_includes(private_unity_narrow_t *this, ike_sa_t *ike_sa)
bool has;
enumerator = this->handler->create_include_enumerator(this->handler,
- ike_sa->get_unique_id(ike_sa));
+ ike_sa->get_id(ike_sa));
has = enumerator->enumerate(enumerator, &ts);
enumerator->destroy(enumerator);