Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: OISF#6276 (cherry picked from commit ccefbd8)
- Loading branch information