Commit Graph

8 Commits

Author SHA1 Message Date
bol-van
9cf2e3f1de ip2net: optimize ipv6 sort for all endianness 2022-06-16 19:45:01 +03:00
bol-van
9529953594 ip2net: improve performance on big endian systems 2022-06-16 15:43:20 +03:00
bol-van
3842cbbca5 ip2net: i hate strict aliasing 2022-06-13 17:51:07 +03:00
Jonathan Wakely
6adaf5ca27
Fix aliasing violations in ip6_and
Accessing uint8_t[16] through a different type is an aliasing violation, i.e. undefined behaviour.

Use memcpy to copy the bytes out, then AND them, then memcpy back in.
The actual memcpy calls will be optimized away, but doing it this way avoids undefined behaviour.
2022-06-08 16:29:44 +01:00
bol-van
2a3b9cf982 test for -1 (EOF) sscanf result 2021-12-27 12:54:07 +03:00
bol-van
0b8072840b ip2net : precompute ipv6 masks 2021-09-18 21:22:29 +03:00
bol-van
9402cd2cf0 ip2net : zero less significant bits in ip4/ip6 addresses, workaround GCC bug 2021-09-12 13:58:13 +03:00
bol-van
3703918a4b history purge 2021-03-04 14:30:38 +03:00