|
|||||||||||
|
documentation/3270: PF BNF grammar has errors (or so it seems)
From: Jesper Louis Andersen <jlouis(at)mongers.org>
Date: Thu May 22 2003 - 07:45:56 EDT
System : OpenBSD 3.3 Architecture: OpenBSD.i386 Machine : i386 >Description: In the BNF grammar of PF (man 5 pf.conf) we define the following: subqueue = STRING | '{' QUEUE-LIST '}' But this is never referenced from anywhere else in the grammar. In the PF faq we define: altq on dc0 cbq bandwidth 2Mb queue { std_in, ssh_im_in, dns_in, bob_in } Which according to the grammar must be:
altq-rule = altq on interface-name queueopts-list
queue queue-list
But queue list is defined as: queue-list = string [ [ , ] string ] So the above Faq line does not abide the grammar (or the other way around ;) /usr/src/sbin/pfctl/parse.y states:
...
and
qassign : /* empty */ { $$ = NULL; }
| qassign_item { $$ = $1; }
| '{' qassign_list '}' { $$ = $2; }
;
which is further defined as you might expect. I do not know what the most beautiful solution is, but it is definitely not correct grammar. >How-To-Repeat:
man 5 pf.conf - read
read the source-code and see what the grammar does in reality. >Release-Note:
This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:29:57 EDT |
||||||||||
|
|||||||||||