1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Unified parsing of prefixes.

Had to rename `prefix' in filters to `fprefix'.
This commit is contained in:
Martin Mares
2000-05-13 11:17:49 +00:00
parent 02bd064ab7
commit 758458be05
7 changed files with 38 additions and 24 deletions

View File

@@ -34,12 +34,11 @@ static_proto:
| static_proto stat_route ';'
;
stat_route0: ROUTE IPA pxlen {
stat_route0: ROUTE prefix {
this_srt = cfg_allocz(sizeof(struct static_route));
add_tail(&((struct static_config *) this_proto)->other_routes, &this_srt->n);
if (!ip_is_prefix($2, $3)) cf_error("Invalid network prefix: %I/%d", $2, $3);
this_srt->net = $2;
this_srt->masklen = $3;
this_srt->net = $2.addr;
this_srt->masklen = $2.len;
}
;