Re: [PATCH] babel: Fix missing modulo comparison of seqnos

2023-01-31 Thread Toke Høiland-Jørgensen via Bird-users
Juliusz Chroboczek writes: >> Introduce a strict-inequality version of the modulo-comparison for this >> purpose. > > Thanks. > > I'm a little worried about the code around line 1017: > > struct babel_source *s = babel_get_source(p, e, e->router_id); > s->expires = current_time() +

Re: [PATCH] babel: Fix missing modulo comparison of seqnos

2023-01-30 Thread Juliusz Chroboczek
> Introduce a strict-inequality version of the modulo-comparison for this > purpose. Thanks. I'm a little worried about the code around line 1017: struct babel_source *s = babel_get_source(p, e, e->router_id); s->expires = current_time() + BABEL_GARBAGE_INTERVAL; if

Re: [PATCH] babel: Fix missing modulo comparison of seqnos

2023-01-30 Thread Toke Høiland-Jørgensen via Bird-users
Ondrej Zajicek writes: > On Mon, Jan 30, 2023 at 11:15:52PM +0100, Toke Høiland-Jørgensen via > Bird-users wrote: >> Juliusz noticed there were a couple of places we were doing straight >> inequality comparisons of seqnos in Babel. This is wrong because seqnos can >> wrap: so we need to use the

Re: [PATCH] babel: Fix missing modulo comparison of seqnos

2023-01-30 Thread Ondrej Zajicek
On Mon, Jan 30, 2023 at 11:15:52PM +0100, Toke Høiland-Jørgensen via Bird-users wrote: > Juliusz noticed there were a couple of places we were doing straight > inequality comparisons of seqnos in Babel. This is wrong because seqnos can > wrap: so we need to use the modulo-64k comparison function

[PATCH] babel: Fix missing modulo comparison of seqnos

2023-01-30 Thread Toke Høiland-Jørgensen via Bird-users
Juliusz noticed there were a couple of places we were doing straight inequality comparisons of seqnos in Babel. This is wrong because seqnos can wrap: so we need to use the modulo-64k comparison function for these cases as well. Introduce a strict-inequality version of the modulo-comparison for