]> git.ipfire.org Git - thirdparty/bird.git/commit
Babel: Initialise source seqno from incoming message
authorToke Høiland-Jørgensen <toke@toke.dk>
Tue, 31 Jan 2023 14:52:14 +0000 (15:52 +0100)
committerIgor Putovny <igor.putovny@nic.cz>
Thu, 30 May 2024 10:30:00 +0000 (12:30 +0200)
commitd3ea8433890998fdb8f739adc59cfbfd27984027
treeab218cb84b2e980224fae57da2f8d83091552b44
parentda3624d6626c3b34bbcffb7a9acbd4aa0f6151d9
Babel: Initialise source seqno from incoming message

When creating a new babel_source object we initialise the seqno to 0. The
caller will update the source object with the right metric and seqno value,
for both newly created and old source objects. However if we initialise the
source object seqno to 0 that may actually turn out to be a valid (higher)
seqno than the one in the routing table, because of seqno wrapping. In this
case the source metric will not be set properly, which breaks feasibility
tracking for subsequent updates.

To fix this, add a new initial_seqno argument to babel_get_source() which
is used when allocating a new object, and set that to the seqno value of
the update we're sending.

Thanks to Juliusz Chroboczek for the bugreport.
proto/babel/babel.c