]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Config undo queuing bug fixed
authorMaria Matejka <mq@ucw.cz>
Thu, 27 Jun 2024 07:48:38 +0000 (09:48 +0200)
committerMaria Matejka <mq@ucw.cz>
Fri, 28 Jun 2024 20:03:45 +0000 (22:03 +0200)
conf/conf.c

index 77740bb8d8ee465e41eeeddcbabc8a594b002bac..9f2596911d068d175b81f2609157747d2b551d5b 100644 (file)
@@ -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);