aboutgitcodebugslistschat
path: root/passt.h
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-01-25 20:21:18 +0100
committerStefano Brivio <sbrivio@redhat.com>2022-01-26 16:30:59 +0100
commitcaa22aa644cb56e6fda77ff80c62d038653f3cf9 (patch)
tree07616ecc3704c24d235591e1efce6fb1031f49b2 /passt.h
parent4c7304db85bd4e8ae641ab946a5b3832f24b6eca (diff)
downloadpasst-caa22aa644cb56e6fda77ff80c62d038653f3cf9.tar
passt-caa22aa644cb56e6fda77ff80c62d038653f3cf9.tar.gz
passt-caa22aa644cb56e6fda77ff80c62d038653f3cf9.tar.bz2
passt-caa22aa644cb56e6fda77ff80c62d038653f3cf9.tar.lz
passt-caa22aa644cb56e6fda77ff80c62d038653f3cf9.tar.xz
passt-caa22aa644cb56e6fda77ff80c62d038653f3cf9.tar.zst
passt-caa22aa644cb56e6fda77ff80c62d038653f3cf9.zip
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>
Diffstat (limited to 'passt.h')
-rw-r--r--passt.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/passt.h b/passt.h
index ae3035f..0ef1897 100644
--- a/passt.h
+++ b/passt.h
@@ -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 */