summaryrefslogtreecommitdiffstats
path: root/filter/config.Y
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2008-10-26 22:36:08 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2008-10-26 22:36:08 +0100
commit11cb620266035ffbe17b21c4a174380cb8b6a521 (patch)
tree09b3aaa27c3a2b3e8f71da5701801679518866cd /filter/config.Y
parent44cb1449edec6a80e063981a955e8025ee87ea65 (diff)
downloadbird-11cb620266035ffbe17b21c4a174380cb8b6a521.tar
bird-11cb620266035ffbe17b21c4a174380cb8b6a521.zip
Implementation of 4B ASN support for BGP
Diffstat (limited to 'filter/config.Y')
-rw-r--r--filter/config.Y11
1 files changed, 4 insertions, 7 deletions
diff --git a/filter/config.Y b/filter/config.Y
index d4bf44c..fdfb2e7 100644
--- a/filter/config.Y
+++ b/filter/config.Y
@@ -39,7 +39,6 @@ CF_KEYWORDS(FUNCTION, PRINT, PRINTN, UNSET, RETURN,
%type <v> set_atom fprefix fprefix_s fipa
%type <s> decls declsn one_decl function_params
%type <h> bgp_path
-%type <i> bgp_one
CF_GRAMMAR
@@ -273,14 +272,12 @@ switch_body: /* EMPTY */ { $$ = NULL; }
/* CONST '(' expr ')' { $$ = f_new_inst(); $$->code = 'c'; $$->aux = T_INT; $$->a2.i = $3; } */
-bgp_one:
- NUM { $$ = $1; }
- | '?' { $$ = PM_ANY; }
- ;
bgp_path:
- bgp_one { $$ = cfg_alloc(sizeof(struct f_path_mask)); $$->next = NULL; $$->val = $1; }
- | bgp_one bgp_path { $$ = cfg_alloc(sizeof(struct f_path_mask)); $$->next = $2; $$->val = $1; }
+ NUM { $$ = cfg_alloc(sizeof(struct f_path_mask)); $$->next = NULL; $$->val = $1; $$->any = 0; }
+ | '?' { $$ = cfg_alloc(sizeof(struct f_path_mask)); $$->next = NULL; $$->val = 0; $$->any = 1; }
+ | NUM bgp_path { $$ = cfg_alloc(sizeof(struct f_path_mask)); $$->next = $2; $$->val = $1; $$->any = 0; }
+ | '?' bgp_path { $$ = cfg_alloc(sizeof(struct f_path_mask)); $$->next = $2; $$->val = 0; $$->any = 1; }
;
constant: