From 9c9059fd172dcc2f8805529de4b3174f280c109c Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Wed, 22 Jun 2022 12:45:42 +0200 Subject: Allowed optimized exporting of a subprefix tree Added an option for export filter to allow for prefiltering based on the prefix. Routes outside the given prefix are completely ignored. Config is simple: export in ; --- proto/pipe/config.Y | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'proto/pipe/config.Y') diff --git a/proto/pipe/config.Y b/proto/pipe/config.Y index c869de9f..0990168e 100644 --- a/proto/pipe/config.Y +++ b/proto/pipe/config.Y @@ -41,6 +41,12 @@ pipe_proto: pipe_proto_start '{' | pipe_proto proto_item ';' | pipe_proto channel_item_ ';' + | pipe_proto IMPORT IN net_any imexport ';' { + if (this_channel->net_type && ($4->type != this_channel->net_type)) + cf_error("Incompatible export prefilter type"); + PIPE_CFG->in_subprefix = $4; + this_channel->in_filter = $5; + } | pipe_proto PEER TABLE rtable ';' { PIPE_CFG->peer = $4; } | pipe_proto MAX GENERATION expr ';' { if (($4 < 1) || ($4 > 254)) cf_error("Max generation must be in range 1..254, got %u", $4); -- cgit v1.2.3