]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Table: not feeding twice, once is enough
authorMaria Matejka <mq@ucw.cz>
Thu, 19 Dec 2024 10:54:05 +0000 (11:54 +0100)
committerMaria Matejka <mq@ucw.cz>
Thu, 19 Dec 2024 10:54:05 +0000 (11:54 +0100)
If there is no feed pending, the requested one should be
activated immediately, otherwise it is activated only after
the full run, effectively running first a full feed and
then the requested one.

nest/rt-export.c

index 7368447dea76346823eb3997547a11aa49f01a31..7d51e54cfd96862a6bc9acdd817230cd0d14984f 100644 (file)
@@ -357,8 +357,16 @@ rt_export_refeed_feeder(struct rt_export_feeder *f, struct rt_feeding_request *r
   if (!rfr)
     return;
 
-  rfr->next = f->feed_pending;
-  f->feed_pending = rfr;
+  if (f->feeding)
+  {
+    rfr->next = f->feed_pending;
+    f->feed_pending = rfr;
+  }
+  else
+  {
+    rfr->next = NULL;
+    f->feeding = rfr;
+  }
 }
 
 void rt_export_refeed_request(struct rt_export_request *rer, struct rt_feeding_request *rfr)