Re: How to detect TCP sequence number wrap around in a netfilterkernel module
Barry Margolin <barmar@alum.mit.edu> writes:
> if (last_ack <= 2^31)
> if (new_ack > last_ack && new_ack <= last_ack+2^31-1)
> else
> if (new_ack > last_ack || new_ack < last_ack-2^31)
I feel like I'm missing something. Isn't this just
if ((s32)((u32)new_ack - (u32)last_ack) > 0)
? That's the "traditional" wrap protected greater than.
-don
|