[RFC PATCH 15/20] adapt protocol filters

Asbjørn Sloth Tønnesen ast at 2e8.dk
Mon Dec 30 17:56:41 CET 2019


---
 nest/config.Y | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/nest/config.Y b/nest/config.Y
index bd1157c6..04808c00 100644
--- a/nest/config.Y
+++ b/nest/config.Y
@@ -262,8 +262,12 @@ proto_channel: channel_start channel_opt_list channel_end;
 rtable: CF_SYM_KNOWN { cf_assert_symbol($1, SYM_TABLE); $$ = $1->table; } ;
 
 imexport:
-   FILTER filter { $$ = $2; }
- | where_filter
+   FILTER filter {
+     $$ = filter_adapt($2, (struct f_context){ .net_type = this_channel->net_type });
+   }
+ | where_filter {
+     $$ = filter_adapt($1, (struct f_context){ .net_type = this_channel->net_type });
+   }
  | ALL { $$ = FILTER_ACCEPT; }
  | NONE { $$ = FILTER_REJECT; }
  ;
-- 
2.24.0



More information about the Bird-users mailing list