1
0
Fork 0
mirror of https://passt.top/passt synced 2025-06-08 08:35:35 +02:00

tcp, udp, util: Fixes for bitmap handling on big-endian, casts

Bitmap manipulating functions would otherwise refer to inconsistent
sets of bits on big-endian architectures. While at it, fix up a
couple of casts.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2022-01-25 20:21:18 +01:00
parent 4c7304db85
commit caa22aa644
5 changed files with 16 additions and 7 deletions

View file

@ -67,7 +67,8 @@ extern char pkt_buf [PKT_BUF_BYTES];
extern char *ip_proto_str[];
#define IP_PROTO_STR(n) \
(((n) <= IPPROTO_SCTP && ip_proto_str[(n)]) ? ip_proto_str[(n)] : "?")
(((uint8_t)(n) <= IPPROTO_SCTP && ip_proto_str[(n)]) ? \
ip_proto_str[(n)] : "?")
#include <resolv.h> /* For MAXNS below */