From: Maria Matejka Date: Thu, 27 Jun 2024 07:48:38 +0000 (+0200) Subject: Config undo queuing bug fixed X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24dfee88a2c292ebb1860fdc30c366efd4860d22;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);