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.
This commit is contained in:
@@ -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, ¤t))
|
||||
{
|
||||
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user