summaryrefslogtreecommitdiff
path: root/nest/proto.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2013-07-24 14:11:12 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2013-07-24 14:11:12 +0200
commit9135c1f0ca6322bff9648895b5394b97761b4bcb (patch)
tree5a1a73f1191dc5f808b823a4f34d6f24f0bcf22b /nest/proto.c
parent48b15ef10fede35113af71bd0dbb0b27a5fcb8f5 (diff)
Fixes bug in protocol flushing and rtable pruning.
When route was propagated to another rtable through a pipe and then the pipe was reconfigured softly in such a way that any subsequent route updates are filtered, then the source protocol shutdown didn't clean up the route in the second rtable which caused stale routes and potential crashes.
Diffstat (limited to 'nest/proto.c')
-rw-r--r--nest/proto.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/nest/proto.c b/nest/proto.c
index 7e7fb7fa..60495aa0 100644
--- a/nest/proto.c
+++ b/nest/proto.c
@@ -835,14 +835,18 @@ static void
proto_schedule_flush_loop(void)
{
struct proto *p;
+ struct announce_hook *h;
if (flush_loop_state)
return;
flush_loop_state = 1;
- rt_schedule_prune_all();
WALK_LIST(p, flush_proto_list)
+ {
p->flushing = 1;
+ for (h=p->ahooks; h; h=h->next)
+ h->table->prune_state = 1;
+ }
ev_schedule(proto_flush_event);
}