From: Maria Matejka Date: Thu, 27 Jun 2024 07:48:38 +0000 (+0200) Subject: Config undo queuing bug fixed X-Git-Tag: v3.0.0~99 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=edffd820573a3b2cc5fb4015880d8ee19da58886;p=thirdparty%2Fbird.git Config undo queuing bug fixed --- diff --git a/conf/conf.c b/conf/conf.c index 77740bb8d..9f2596911 100644 --- a/conf/conf.c +++ b/conf/conf.c @@ -358,8 +358,16 @@ config_done(void) if (future_cftype) { int type = future_cftype; + struct config *fc = OBSREF_GET(future_config); - CONFIG_REF_LOCAL(conf, OBSREF_GET(future_config)); + if (type == RECONFIG_UNDO) + { + ASSERT_DIE(!fc); + ASSERT_DIE(old_config); + fc = old_config; + } + + CONFIG_REF_LOCAL(conf, fc); future_cftype = RECONFIG_NONE; OBSREF_CLEAR(future_config);