From: Maria Matejka Date: Sun, 2 Jul 2023 13:10:39 +0000 (+0200) Subject: Filter iterator accepts lines instead of filter X-Git-Tag: v3.0.0~413 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=206b33fd0b3506766b832e89f3fccb889219b031;p=thirdparty%2Fbird.git Filter iterator accepts lines instead of filter --- diff --git a/filter/f-inst.h b/filter/f-inst.h index fbc59de76..445161747 100644 --- a/filter/f-inst.h +++ b/filter/f-inst.h @@ -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) ({ \ diff --git a/nest/proto.c b/nest/proto.c index 83fbce2c0..0304ef7f9 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -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) {