Re: rdr pass for proto tcp sometimes creates states with expire time zero and so breaking connections

2018-10-27 Thread Andreas Longwitz
> In the problem I have reported for states of "rdr pass" rules I see > start=6000, end=12000, timeout=86400 and (obviously erroneous, probably > negative) states=0xffd0. > > I have no idea how that can happen. Just to make sure I understand: you > know that states is negative here

Re: rdr pass for proto tcp sometimes creates states with expire time zero and so breaking connections

2018-10-27 Thread Kristof Provost
On 27 Oct 2018, at 5:22, Andreas Longwitz wrote: Thanks very much for answer especially for the hint to openbsd. I wonder if there’s an integer overflow in the of_state_expires() calculation. The OpenBSD people have a cast to u_int64_t in their version: |timeout = (u_int64_t)timeout * (end - s

Re: rdr pass for proto tcp sometimes creates states with expire time zero and so breaking connections

2018-10-27 Thread Andreas Longwitz
Thanks very much for answer especially for the hint to openbsd. > I wonder if there’s an integer overflow in the of_state_expires() > calculation. > The OpenBSD people have a cast to u_int64_t in their version: > > |timeout = (u_int64_t)timeout * (end - states) / (end - start); > | > > Perhaps t