]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Export: Throw a warning instead of crashing on export_accepted_map inconsistency
authorMaria Matejka <mq@ucw.cz>
Thu, 27 Jun 2024 11:49:37 +0000 (13:49 +0200)
committerMaria Matejka <mq@ucw.cz>
Fri, 28 Jun 2024 20:03:45 +0000 (22:03 +0200)
nest/rt-table.c

index a401035f9d66ad8812a8ada562f4c92c364566b6..eaabb93957f178582e21f5130760d86d5c597290 100644 (file)
@@ -1051,8 +1051,11 @@ rt_notify_basic(struct channel *c, const rte *new, const rte *old)
   /* If this is a refeed, we may need to copy the new route to the old one */
   if (!old && bmap_test(&c->export_accepted_map, new->id))
   {
-    ASSERT_DIE(rt_export_get_state(&c->out_req) == TES_PARTIAL);
-    old = new;
+    if (rt_export_get_state(&c->out_req) == TES_PARTIAL)
+      old = new;
+    else
+      log(L_WARN "%s.%s: Got new route for %N (id %u) which is already marked accepted, weird",
+         c->proto->name, c->name, new->net, new->id);
   }
 
   /* Run the filters, actually */