While working on allowing us to use IPv4/IPv6 combined listening sockets, I made several endian mistakes. So, I took a diversion to make it harder to make such mistakes. Along the way I found some small existing endian and other bugs in IPv4 address handling. Changes since v1: * Added extra patch making more safety conversion * Added extra patch making some tangentially related comment fixes David Gibson (6): Correct some missing endian conversions of IPv4 addresses Minor improvements to IPv4 netmask handling Use IPV4_IS_LOOPBACK more widely Use typing to reduce chances of IPv4 endianness errors Use endian-safer typing in struct tap4_l4_t tcp: Correct function comments for address types checksum.c | 7 ++-- checksum.h | 3 +- conf.c | 118 ++++++++++++++++++++++++++++++----------------------- dhcp.c | 15 ++++--- icmp.c | 5 +-- passt.c | 2 +- passt.h | 16 ++++---- pasta.c | 7 +--- tap.c | 49 +++++++++++----------- tap.h | 8 ++-- tcp.c | 60 +++++++++++++-------------- tcp.h | 2 +- udp.c | 30 +++++++------- udp.h | 2 +- util.h | 12 +++++- 15 files changed, 182 insertions(+), 154 deletions(-) -- 2.38.1