summaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-05-13 13:41:26 +0200
committerMartin Mares <mj@ucw.cz>2000-05-13 13:41:26 +0200
commitd3abfbc68d7f921b2547b39a6baa9bee6c89b78d (patch)
tree374b7c40c4f7bd968e46542438a2f17a142abc89 /conf
parent758458be054ebdf4cd77620faf214f2b491a49dc (diff)
downloadbird-d3abfbc68d7f921b2547b39a6baa9bee6c89b78d.tar
bird-d3abfbc68d7f921b2547b39a6baa9bee6c89b78d.zip
Added prefix_or_ipa.
Diffstat (limited to 'conf')
-rw-r--r--conf/confbase.Y7
1 files changed, 6 insertions, 1 deletions
diff --git a/conf/confbase.Y b/conf/confbase.Y
index c614301..4626d44 100644
--- a/conf/confbase.Y
+++ b/conf/confbase.Y
@@ -53,7 +53,7 @@ CF_DECLS
%type <i> expr bool pxlen
%type <time> datetime
-%type <px> prefix
+%type <px> prefix prefix_or_ipa
%nonassoc '=' '<' '>' '~' '.' GEQ LEQ NEQ
%left '+' '-'
@@ -118,6 +118,11 @@ prefix:
}
;
+prefix_or_ipa:
+ prefix
+ | IPA { $$.addr = $1; $$.len = BITS_PER_IP_ADDRESS; }
+ ;
+
pxlen:
'/' NUM {
if ($2 < 0 || $2 > BITS_PER_IP_ADDRESS) cf_error("Invalid prefix length %d", $2);