]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Filter iterator accepts lines instead of filter
authorMaria Matejka <mq@ucw.cz>
Sun, 2 Jul 2023 13:10:39 +0000 (15:10 +0200)
committerMaria Matejka <mq@ucw.cz>
Sun, 24 Sep 2023 18:43:04 +0000 (20:43 +0200)
filter/f-inst.h
nest/proto.c

index fbc59de761a22fb4e7cfde237380cc04a6aa4482..44516174776efb2adc196dab3349da32b4fd474d 100644 (file)
@@ -67,10 +67,10 @@ struct filter_iterator {
 
 void f_add_lines(const struct f_line_item *what, struct filter_iterator *fit);
 
-#define FILTER_ITERATE_INIT(fit, filter, pool)                 \
+#define FILTER_ITERATE_INIT(fit, line, pool)                   \
   ({                                                           \
     BUFFER_INIT((fit)->lines, (pool), 32);                     \
-    BUFFER_PUSH((fit)->lines) = (filter)->root;                        \
+    BUFFER_PUSH((fit)->lines) = (line);                                \
   })
 
 #define FILTER_ITERATE(fit, fi) ({                             \
index 83fbce2c03cc375741ad4d4ee5eccaf24b93d9c9..0304ef7f927f0da987eda42bf7cdd4fa5761c252 100644 (file)
@@ -420,7 +420,7 @@ channel_roa_subscribe_filter(struct channel *c, int dir)
 #endif
 
   struct filter_iterator fit;
-  FILTER_ITERATE_INIT(&fit, f, c->proto->pool);
+  FILTER_ITERATE_INIT(&fit, f->root, c->proto->pool);
 
   FILTER_ITERATE(&fit, fi)
   {