From 78a45f762d19b6b3079951f471f8811744f2bd81 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Thu, 23 Feb 2023 02:16:56 +0100 Subject: pfinet: Fix shifting left into bit 31 --- pfinet/linux-src/include/net/sock.h | 2 +- pfinet/linux-src/include/net/tcp.h | 6 +++--- pfinet/linux-src/net/ipv6/ip6_fib.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'pfinet/linux-src') diff --git a/pfinet/linux-src/include/net/sock.h b/pfinet/linux-src/include/net/sock.h index b149224a..5c4444d1 100644 --- a/pfinet/linux-src/include/net/sock.h +++ b/pfinet/linux-src/include/net/sock.h @@ -203,7 +203,7 @@ struct tcp_sack_block { }; struct tcp_opt { - int tcp_header_len; /* Bytes of tcp header to send */ + unsigned int tcp_header_len; /* Bytes of tcp header to send */ /* * Header prediction flags diff --git a/pfinet/linux-src/include/net/tcp.h b/pfinet/linux-src/include/net/tcp.h index d6797ea5..b95bd20d 100644 --- a/pfinet/linux-src/include/net/tcp.h +++ b/pfinet/linux-src/include/net/tcp.h @@ -835,9 +835,9 @@ static __inline__ void tcp_push_pending_frames(struct sock *sk, struct tcp_opt * /* This tells the input processing path that an ACK should go out * right now. */ -#define tcp_enter_quickack_mode(__tp) ((__tp)->ato |= (1<<31)) -#define tcp_exit_quickack_mode(__tp) ((__tp)->ato &= ~(1<<31)) -#define tcp_in_quickack_mode(__tp) (((__tp)->ato & (1 << 31)) != 0) +#define tcp_enter_quickack_mode(__tp) ((__tp)->ato |= (1U<<31)) +#define tcp_exit_quickack_mode(__tp) ((__tp)->ato &= ~(1U<<31)) +#define tcp_in_quickack_mode(__tp) (((__tp)->ato & (1U << 31)) != 0) /* * List all states of a TCP socket that can be viewed as a "connected" diff --git a/pfinet/linux-src/net/ipv6/ip6_fib.c b/pfinet/linux-src/net/ipv6/ip6_fib.c index 670860b2..78b972ac 100644 --- a/pfinet/linux-src/net/ipv6/ip6_fib.c +++ b/pfinet/linux-src/net/ipv6/ip6_fib.c @@ -153,7 +153,7 @@ static __inline__ int addr_bit_set(void *token, int fn_bit) { __u32 *addr = token; - return htonl(1 << ((~fn_bit)&0x1F)) & addr[fn_bit>>5]; + return htonl(1U << ((~fn_bit)&0x1F)) & addr[fn_bit>>5]; } /* -- cgit v1.2.3