]> git.ipfire.org Git - thirdparty/suricata.git/commit
detect: Avoid recomputing ntohl() in addr match 6779/head
authorJeff Lucovsky <jeff@lucovsky.org>
Sun, 26 Dec 2021 15:22:34 +0000 (10:22 -0500)
committerVictor Julien <vjulien@oisf.net>
Thu, 13 Jan 2022 08:10:46 +0000 (09:10 +0100)
commitf30d8ece80cbd6414dfbb7ef1bc8effa26996a44
treec86bdc826cea235bbb3efec0a775ca2a56659170
parent86ea7f24742228de26f9b4bd16ce29264cc93070
detect: Avoid recomputing ntohl() in addr match

This commit makes a small optimization when comparing IPv4 and IPv6
addresses by making the host order value invariant and calculating the
value once, before entering the loop.
src/detect-engine-address.c