]> 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)
committerOndrej Zajicek <santiago@crfreenet.org>
Tue, 31 Jan 2023 14:52:14 +0000 (15:52 +0100)
commitdc4c5f51f83f97100b207136ecfde8ff94e597e6
treeb8435ac6d6430943a0b9577c5ce0e85109f42987
parent96d7c4679df49b34be004177b10a99210af5f141
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