0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-02-04 15:20:10 +00:00

Babel: fix seqno wrapping on seqno request

The Babel seqno wraps around when reaching its maximum value (UINT16_MAX).
When comparing seqnos, this has to be taken into account. Therefore,
plain number comparisons do not work.
This commit is contained in:
Fabian Bläse 2024-12-10 02:14:06 +01:00 committed by Maria Matejka
parent 1dbee120d3
commit de7ded6ef6

View File

@ -1015,7 +1015,7 @@ babel_send_update_(struct babel_iface *ifa, btime changed, struct fib *rtable)
/* Our own seqno might have changed, in which case we update the routes we
originate. */
if ((e->router_id == p->router_id) && (e->seqno < p->update_seqno))
if ((e->router_id == p->router_id) && gt_mod64k(p->update_seqno, e->seqno))
{
e->seqno = p->update_seqno;
e->updated = current_time();