summaryrefslogtreecommitdiff
path: root/nest/config.Y
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-04-05 20:15:31 +0000
committerMartin Mares <mj@ucw.cz>1999-04-05 20:15:31 +0000
commit5056c559c4eb253a4eee10cf35b694faec5265eb (patch)
tree404a26d748f50a40514f0d0ed448034b7dfa396b /nest/config.Y
parent63a381dbf5e37c2740982d07988cea983c699816 (diff)
Changed syntax of attaching filters to protocols to hopefully the final
version: EXPORT <filter-spec> for outbound routes (i.e., those announced by BIRD to the rest of the world). IMPORT <filter-spec> for inbound routes (i.e., those imported by BIRD from the rest of the world). where <filter-spec> is one of: ALL pass all routes NONE drop all routes FILTER <name> use named filter FILTER { <filter> } use explicitly defined filter For all protocols, the default is IMPORT ALL, EXPORT NONE. This includes the kernel protocol, so that you need to add EXPORT ALL to get the previous configuration of kernel syncer (as usually, see doc/bird.conf.example for a bird.conf example :)).
Diffstat (limited to 'nest/config.Y')
-rw-r--r--nest/config.Y13
1 files changed, 10 insertions, 3 deletions
diff --git a/nest/config.Y b/nest/config.Y
index c855f093..c535e9ec 100644
--- a/nest/config.Y
+++ b/nest/config.Y
@@ -17,9 +17,10 @@ void rt_dev_add_iface(char *);
CF_DECLS
CF_KEYWORDS(ROUTER, ID, PROTOCOL, PREFERENCE, DISABLED, DEBUG, ALL, OFF, DIRECT)
-CF_KEYWORDS(INTERFACE, INPUT, OUTPUT, FILTER)
+CF_KEYWORDS(INTERFACE, IMPORT, EXPORT, FILTER, NONE)
%type <i> idval
+%type <f> imexport
CF_GRAMMAR
@@ -67,8 +68,14 @@ proto_item:
| DEBUG expr { this_proto->debug = $2; }
| DEBUG ALL { this_proto->debug = ~0; }
| DEBUG OFF { this_proto->debug = 0; }
- | INPUT FILTER filter { this_proto->in_filter = $3; }
- | OUTPUT FILTER filter { this_proto->out_filter = $3; }
+ | IMPORT imexport { this_proto->in_filter = $2; }
+ | EXPORT imexport { this_proto->out_filter = $2; }
+ ;
+
+imexport:
+ FILTER filter { $$ = $2; }
+ | ALL { $$ = FILTER_ACCEPT; }
+ | NONE { $$ = FILTER_REJECT; }
;
/* Direct device route protocol */