Re: ip input fragment mutex

2022-08-04 Thread Vitaliy Makkoveev
I’m surprised by ISSET() macro. ok mvs@ > On 4 Aug 2022, at 20:06, Alexander Bluhm wrote: > > On Thu, Jul 28, 2022 at 04:41:54PM +0200, Alexander Bluhm wrote: >> -mff = (ip->ip_off & htons(IP_MF)) != 0; >> +mff = ISSET(ip->ip_off, htons(IP_MF)); > > This part breaks big

Re: ip input fragment mutex

2022-08-04 Thread Alexander Bluhm
On Thu, Jul 28, 2022 at 04:41:54PM +0200, Alexander Bluhm wrote: > - mff = (ip->ip_off & htons(IP_MF)) != 0; > + mff = ISSET(ip->ip_off, htons(IP_MF)); This part breaks big endian machines. New mff is 0x0020 on little and 0x2000 on big endian. Later it is assigned to u_int8

ip input fragment mutex

2022-07-28 Thread Alexander Bluhm
Hi, Checking the fragment flags of an IP packet does not need the mutex for the fragment list. Move this code before the critical section. Use ISSET() to make obvious which flags are checked. ok? bluhm Index: netinet/ip_input.c =