[Midnightbsd-cvs] src: radix.c: Fix a 16 year old bug in the sorting routine for

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Wed May 4 20:58:29 EDT 2011


Log Message:
-----------
Fix a 16 year old bug in the sorting routine for non-contiguous netmasks.
For masks of identical length rn_lexobetter() did not stop on the
first non-equal byte. This leads rn_addroute() to not detecting
duplicate entries and thus we might create a very long list of masks
to check for each node.
This can have a huge impact on IPsec performance, where non-contiguous
masks are used for the flow lookup.  In a setup with 1300 flows we
saw 400 duplicate masks and only a third of the expected throughput.

Obtained from: OpenBSD (revision 1.28 src/sys/net/radix.c)

Modified Files:
--------------
    src/sys/net:
        radix.c (r1.3 -> r1.4)
        (http://cvsweb.midnightbsd.org/src/sys/net/radix.c?r1=1.3&r2=1.4)


More information about the Midnightbsd-cvs mailing list