-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
srcpkgs/bird/patches/cfac0076fb7365fe91360fa351f311f141a7a303.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
From cfac0076fb7365fe91360fa351f311f141a7a303 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Fabian=20Bl=C3=A4se?= <[email protected]> | ||
Date: Tue, 10 Dec 2024 02:14:06 +0100 | ||
Subject: [PATCH] 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. | ||
--- | ||
proto/babel/babel.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/proto/babel/babel.c b/proto/babel/babel.c | ||
index fe5c0599a..b5cbb63f8 100644 | ||
--- a/proto/babel/babel.c | ||
+++ b/proto/babel/babel.c | ||
@@ -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(); | ||
-- | ||
GitLab | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters