From 758458be054ebdf4cd77620faf214f2b491a49dc Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 13 May 2000 11:17:49 +0000 Subject: Unified parsing of prefixes. Had to rename `prefix' in filters to `fprefix'. --- proto/static/config.Y | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'proto/static') diff --git a/proto/static/config.Y b/proto/static/config.Y index 12d7934..0197da3 100644 --- a/proto/static/config.Y +++ b/proto/static/config.Y @@ -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; } ; -- cgit v1.2.3