Re: pf.conf macro with space

2016-06-21 Thread Stuart Henderson
On 2016/06/21 08:57, sven falempin wrote: > A parsing tool is not like hacking into an advanced kernel > feature with unexpected side effect That is incorrect. I'm not implying anything about diffs proposed in this thread, but this parser *is* sensitive, it's more complex than you think, and

Re: pf.conf macro with space

2016-06-21 Thread Stefan Sperling
On Tue, Jun 21, 2016 at 08:57:44AM -0400, sven falempin wrote: > I have explain the use of spaced macro, > a config file that is self explanatory. I suggest you use underscores instead of spaces in macro names.

Re: pf.conf macro with space

2016-06-21 Thread Mike Belopuhov
On 21 June 2016 at 14:57, Sebastian Benoit wrote: > Henning Brauer(hb-openbsdt...@ml.bsws.de) on 2016.06.21 13:11:16 +0200: >> * Stefan Sperling [2016-06-21 11:15]: >> > Generally, I would appreciate more detailed error messages from the pf.conf >> > parser. I

Re: pf.conf macro with space

2016-06-21 Thread Otto Moerbeek
On Tue, Jun 21, 2016 at 01:11:16PM +0200, Henning Brauer wrote: > * Stefan Sperling [2016-06-21 11:15]: > > Generally, I would appreciate more detailed error messages from the pf.conf > > parser. I recall several occasions where pfctl threw "syntax error" and more > > specific

Re: pf.conf macro with space

2016-06-21 Thread sven falempin
On Tue, Jun 21, 2016 at 8:30 AM, Stefan Sperling wrote: > On Tue, Jun 21, 2016 at 01:11:16PM +0200, Henning Brauer wrote: > > however, the ruleset in this case does NOT load. > > $ echo '"a macro with spaces"="foo"\npass from $a\ > macro\ with\ spaces"' | pfctl

Re: pf.conf macro with space

2016-06-21 Thread Sebastian Benoit
Henning Brauer(hb-openbsdt...@ml.bsws.de) on 2016.06.21 13:11:16 +0200: > * Stefan Sperling [2016-06-21 11:15]: > > Generally, I would appreciate more detailed error messages from the pf.conf > > parser. I recall several occasions where pfctl threw "syntax error" and more > >

Re: pf.conf macro with space

2016-06-21 Thread Stefan Sperling
On Tue, Jun 21, 2016 at 01:11:16PM +0200, Henning Brauer wrote: > however, the ruleset in this case does NOT load. > $ echo '"a macro with spaces"="foo"\npass from $a\ macro\ > with\ spaces"' | pfctl -nvf - > a macro with spaces = "foo" > stdin:2: macro 'a' not defined > stdin:2:

Re: pf.conf macro with space

2016-06-21 Thread Stefan Sperling
On Tue, Jun 21, 2016 at 10:37:45AM +0200, Henning Brauer wrote: > * Sebastian Benoit [2016-06-21 10:15]: > > same thing without a stupid helper function, pointed out by henning. > > I'm actually not quite sure we need or want this. From my PoV, making > the tools too much of a

Re: pf.conf macro with space

2016-06-21 Thread Henning Brauer
* Sebastian Benoit [2016-06-21 10:15]: > same thing without a stupid helper function, pointed out by henning. I'm actually not quite sure we need or want this. From my PoV, making the tools too much of a nanny is against unix spirit. Macros with spaces don't actually cause

Re: pf.conf macro with space

2016-06-21 Thread Sebastian Benoit
Stefan Sperling(s...@stsp.name) on 2016.06.21 10:23:13 +0200: > On Tue, Jun 21, 2016 at 10:14:52AM +0200, Sebastian Benoit wrote: > > > > same thing without a stupid helper function, pointed out by henning. > > > > diff --git sbin/pfctl/parse.y sbin/pfctl/parse.y > > index 934438c..426cd93

Re: pf.conf macro with space

2016-06-21 Thread Stefan Sperling
On Tue, Jun 21, 2016 at 10:14:52AM +0200, Sebastian Benoit wrote: > > same thing without a stupid helper function, pointed out by henning. > > diff --git sbin/pfctl/parse.y sbin/pfctl/parse.y > index 934438c..426cd93 100644 > --- sbin/pfctl/parse.y > +++ sbin/pfctl/parse.y > @@ -714,6 +714,10 @@

Re: pf.conf macro with space

2016-06-21 Thread Florian Obser
On Tue, Jun 21, 2016 at 10:14:52AM +0200, Sebastian Benoit wrote: > > same thing without a stupid helper function, pointed out by henning. OK florian@ (for all parse.y instances we have, oh and as usual you forgot cwm in your list :) ) > > diff --git sbin/pfctl/parse.y sbin/pfctl/parse.y >

Re: pf.conf macro with space

2016-06-21 Thread Sebastian Benoit
same thing without a stupid helper function, pointed out by henning. diff --git sbin/pfctl/parse.y sbin/pfctl/parse.y index 934438c..426cd93 100644 --- sbin/pfctl/parse.y +++ sbin/pfctl/parse.y @@ -714,6 +714,10 @@ numberstring : NUMBER { varset :

Re: pf.conf macro with space

2016-06-20 Thread Sebastian Benoit
sven falempin(sven.falem...@gmail.com) on 2016.06.20 17:38:40 -0400: > Dear Tech Readers, > > in a pf.conf file one can do > "silly things" = egress Thanks for your diff, but one, i dont think spaces in macros are useful in pf.conf. second, we want to keep this consistent across all the

pf.conf macro with space

2016-06-20 Thread sven falempin
Dear Tech Readers, in a pf.conf file one can do "silly things" = egress as defined in parse.y like varset : STRING '=' varstring { if (pf->opts & PF_OPT_VERBOSE) printf("%s = \"%s\"\n", $1, $3); if