summaryrefslogtreecommitdiff
path: root/nest/config.Y
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-06-22 12:45:42 +0200
committerMaria Matejka <mq@ucw.cz>2022-06-24 15:49:08 +0200
commit9c9059fd172dcc2f8805529de4b3174f280c109c (patch)
treeb0e642405a9485b0f571d8414720a072aac7b404 /nest/config.Y
parent050b4b4e5e6d4c05345bed2ec62c865258b4e7ee (diff)
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 <net> <filter>;
Diffstat (limited to 'nest/config.Y')
-rw-r--r--nest/config.Y6
1 files changed, 6 insertions, 0 deletions
diff --git a/nest/config.Y b/nest/config.Y
index ea7e1266..c3f2532f 100644
--- a/nest/config.Y
+++ b/nest/config.Y
@@ -306,6 +306,12 @@ channel_item_:
this_channel->table = $2;
}
| IMPORT imexport { this_channel->in_filter = $2; }
+ | EXPORT IN net_any imexport {
+ if (this_channel->net_type && ($3->type != this_channel->net_type))
+ cf_error("Incompatible export prefilter type");
+ this_channel->out_subprefix = $3;
+ this_channel->out_filter = $4;
+ }
| EXPORT imexport { this_channel->out_filter = $2; }
| RECEIVE LIMIT limit_spec { this_channel->rx_limit = $3; }
| IMPORT LIMIT limit_spec { this_channel->in_limit = $3; }