]> git.ipfire.org Git - thirdparty/bird.git/commit
Table: Fixed feed race condition
authorMaria Matejka <mq@ucw.cz>
Sun, 24 Sep 2023 09:47:24 +0000 (11:47 +0200)
committerMaria Matejka <mq@ucw.cz>
Sun, 24 Sep 2023 18:43:04 +0000 (20:43 +0200)
commit32bb548c116b40f79d077c10356c037770ed1005
tree914337f4196270af4f1cabec5729fa957bf1bb74
parentc262c728eb974e13e333cc87d3aa65183e8890b5
Table: Fixed feed race condition

The problem happened like this:

1. Single route for the given net in table
2. A feed is started
3. The route is deleted (from another thread)
4. The feed finds an empty net, exports nothing, ignores journal (here is bug)
5. The route is added
6. The export transitions from FEEDING to READY
7. While processing the journal, the route deletion and addition combines into noop.

This way routes mysteriously disappeared in specific cases of link instability.

Problem fixed by explicitly marking the empty-net journal entries as processed in step 4.
nest/proto.c
nest/rt-table.c
nest/rt.h