]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Proto: fix reimporter crash on shutdown
authorMaria Matejka <mq@ucw.cz>
Thu, 6 Jun 2024 12:04:06 +0000 (14:04 +0200)
committerMaria Matejka <mq@ucw.cz>
Wed, 12 Jun 2024 07:23:50 +0000 (09:23 +0200)
Channel transition to CS_STOP forgot to postpone the reimporter event,
thus reimport could theoretically run too late and cause trouble.

nest/proto.c

index 3493b23926fe06f855ea7cde550302f4aba75db1..963edce689ddf2bb5d1c03471830c756773dc39d 100644 (file)
@@ -401,6 +401,8 @@ static void
 channel_roa_reload_done(struct rt_feeding_request *req)
 {
   SKIP_BACK_DECLARE(struct roa_subscription, s, rfr, req);
+  ASSERT_DIE(s->c->channel_state == CS_UP);
+
   lfjour_release(&s->digest_recipient);
   ev_send(proto_work_list(s->c->proto), &s->update_event);
   /* FIXME: this should reset import/export filters if ACTION BLOCK */
@@ -786,6 +788,7 @@ channel_do_stop(struct channel *c)
 
   /* Need to abort reimports as well */
   rt_feeder_unsubscribe(&c->reimporter);
+  ev_postpone(&c->reimport_event);
 
   c->gr_wait = 0;
   if (c->gr_lock)