]> git.ipfire.org Git - thirdparty/bird.git/commit
Table: Do not attempt to prune an empty table
authorMaria Matejka <mq@ucw.cz>
Sat, 24 May 2025 12:16:44 +0000 (14:16 +0200)
committerMaria Matejka <mq@ucw.cz>
Sun, 25 May 2025 17:39:04 +0000 (19:39 +0200)
commit4bd5af04af1cd69e16fdddd59155625b96923dbb
tree0154555af7d11c4da4125d3a16cd34be2cbb67b1
parent681eee879b8f4ec16002a9d8c1c40357d45fefca
Table: Do not attempt to prune an empty table

Table pruning is requested from multiple places, including
a timer. Sometimes this may happen in a race condition with
table shutdown, and therefore we explicitly refuse to schedule
pruning if the table is empty.

Also added a full-blown check that a shutting-down table
is indeed empty, and several more asserts to catch imminent crashes
before they happen in hard-to-debug places.

This fixes #254.
nest/rt-export.c
nest/rt-table.c
proto/bgp/attrs.c