[Swan-dev] ikev2_child.c: simpified (?) algorithm for checking fits

Vukasin Karadzic vukasin.karadzic at gmail.com
Mon Jan 29 21:14:37 UTC 2018

Hi all.

I stumbled upon to two /* ??? stupid n**2 algorithm */ comments in
ikev2_child.c, in functions

ikev2_evaluate_connection_protocol_fit. and
int ikev2_evaluate_connection_port_fit

I made a patch, trying to reduce it to O(n) algorithm,
it seems right to me, but probably it will be better if more people
examine it, so please do it if you can :)

Here's a github link:

but you can also find it attached in this e-mail.

Vukasin K.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libreswan.org/pipermail/swan-dev/attachments/20180129/e088dd48/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ikev2_child.patch
Type: text/x-patch
Size: 5802 bytes
Desc: not available
URL: <https://lists.libreswan.org/pipermail/swan-dev/attachments/20180129/e088dd48/attachment.bin>

More information about the Swan-dev mailing list