Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

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


>Number: 3270
>Category: documentation
>Synopsis: PF BNF grammar has errors (or so it seems)
>Confidential: no
net
>Environment:
        

	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:

Do you need help?X

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:

...
altqif : ALTQ interface queue_opts QUEUE qassign { ...

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
>Fix:

Do you need more help?X

        read the source-code and see what the grammar does in reality.

>Release-Note:
Received on Thu May 22 08:09:53 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:29:57 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library