From: Maria Matejka Date: Thu, 6 Jun 2024 12:04:06 +0000 (+0200) Subject: Proto: fix reimporter crash on shutdown X-Git-Tag: v3.0.0~178 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbe246a4bd52f2e771665b2848021e7709752e3d;p=thirdparty%2Fbird.git Proto: fix reimporter crash on shutdown Channel transition to CS_STOP forgot to postpone the reimporter event, thus reimport could theoretically run too late and cause trouble. --- diff --git a/nest/proto.c b/nest/proto.c index 3493b2392..963edce68 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -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)