mirror of https://github.com/OISF/suricata
community-id: Fix IPv6 address sorting not respecting byte order
When comparing IPv6 addresses based on uint32_t chunks, one needs to
apply ntohl() conversion to the individual parts, otherwise on little
endian systems individual bytes are compared in the wrong order.
Avoid this all and leverage memcmp(), it'll short circuit on the first
differing byte and its return values tells us which address sorts lower.
Bug: #6276
(cherry picked from commit 0ddc44f4c1)
pull/9460/head
parent
4257725dc0
commit
7408b4560c
Loading…
Reference in New Issue