Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jul 2008 19:52:00 +0200
From:      Max Laier <max@love2party.net>
To:        freebsd-pf@freebsd.org
Subject:   Re: BNF Syntax of pf commands
Message-ID:  <200807211952.00497.max@love2party.net>
In-Reply-To: <20080721170155.5BF2B8FC18@mx1.freebsd.org>
References:  <20080721170155.5BF2B8FC18@mx1.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 21 July 2008 19:01:55 Dave wrote:
> On Mon, Jul 21, 2008 at 05:40:55AM -0700, Jeremy Chadwick wrote:
> >On Mon, Jul 21, 2008 at 12:38:00PM +0000, Dave wrote:
> >> I'm looking for a BNF description of the PF ruleset.
> >> Is that available somewhere?
> >
> >It's in the manpage, section GRAMMAR.
> >
> >http://www.freebsd.org/cgi/man.cgi?query=pf.conf&apropos=0&sektion=5&m
> >anpath=FreeBSD+7.0-stable&format=html#end
>
> Thanks! I had just found this myself using google and noticed that the
> bnf is coded up by hand instead of via yacc or bison. The reason I got
> interested in this is that I saw pretty clear indications on my OpenBSD
> 4,3 pf firewall that certain 'equivalent' rules (differing only the
> presence or absence of 'optional' syntactic sugar keywords ) in my
> pf.conf file did not produce identical behavior from pf. I've started
> wondering about how one would implement regression testing on pf.

Do you have an example?  It's hard to imagine how that would be possible.

There are some parser regression tests in OpenBSD's source tree, but to my 
knowledge there is no "action" testing.

-- 
/"\  Best regards,                      | mlaier@freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier@EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807211952.00497.max>