summaryrefslogtreecommitdiffstats
path: root/nest
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-05-13 13:17:49 +0200
committerMartin Mares <mj@ucw.cz>2000-05-13 13:17:49 +0200
commit758458be054ebdf4cd77620faf214f2b491a49dc (patch)
treee8cdebbcf3095ddc1db63ac3c5b611f9708c9879 /nest
parent02bd064ab76f163313261dad5c273cb376be2a75 (diff)
downloadbird-758458be054ebdf4cd77620faf214f2b491a49dc.tar
bird-758458be054ebdf4cd77620faf214f2b491a49dc.zip
Unified parsing of prefixes.
Had to rename `prefix' in filters to `fprefix'.
Diffstat (limited to 'nest')
-rw-r--r--nest/config.Y11
1 files changed, 5 insertions, 6 deletions
diff --git a/nest/config.Y b/nest/config.Y
index e5249ea..f92c054 100644
--- a/nest/config.Y
+++ b/nest/config.Y
@@ -124,8 +124,8 @@ debug_default:
iface_patt:
TEXT { this_ipatt->pattern = $1; this_ipatt->prefix = IPA_NONE; this_ipatt->pxlen = 0; }
- | IPA pxlen { this_ipatt->pattern = NULL; this_ipatt->prefix = $1; this_ipatt->pxlen = $2; }
- | TEXT IPA pxlen { this_ipatt->pattern = $1; this_ipatt->prefix = $2; this_ipatt->pxlen = $3; }
+ | prefix { this_ipatt->pattern = NULL; this_ipatt->prefix = $1.addr; this_ipatt->pxlen = $1.len; }
+ | TEXT prefix { this_ipatt->pattern = $1; this_ipatt->prefix = $2.addr; this_ipatt->pxlen = $2.len; }
;
/* Direct device route protocol */
@@ -250,12 +250,11 @@ r_args:
$$->filter = FILTER_ACCEPT;
$$->table = config->master_rtc->table;
}
- | r_args IPA pxlen {
+ | r_args prefix {
$$ = $1;
if ($$->pxlen != 256) cf_error("Only one prefix expected");
- if (!ip_is_prefix($2, $3)) cf_error("Invalid prefix");
- $$->prefix = $2;
- $$->pxlen = $3;
+ $$->prefix = $2.addr;
+ $$->pxlen = $2.len;
}
| r_args TABLE SYM {
$$ = $1;