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:
parent
4c7304db85
commit
caa22aa644
5 changed files with 16 additions and 7 deletions
3
passt.h
3
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 */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue