Hi,
I am running OpenBSD 4.3 STABLE in an i386 machine.
The man page for pf.conf says at some point:
"Any lines beginning with a # are treated as comments and ignored."
Now, if a comment line ends with "\", should the next line
be also treated as comment? I noticed this behaviour and I do
not know whether or not it should work like that.Many times, when we are trying to test a different setup, we
duplicate a line, change something, and comment out the
original line.Thanks in advance.
Regards,
Jose
--
See Exclusive Videos: 10th Annual Young Hollywood Awards
http://www.hollywoodlife.net/younghollywoodawards2008/
Yes, pf.conf(5) says that about the table files.
About the main pf.conf(5) file itself, it says:
Comments can be put anywhere in the file using a hash mark (`#'), and ex-
Well, because you used \ to end the line, that # is not at the start of a
line. It is in the middle of a split line. And the previously describedWell, the result is predictable.
On Fri, Jun 13, 2008 at 1:14 PM, Theo de Raadt <deraadt@cvs.openbsd.org> wrote:
Sadly, this varies among languages and file-formats. You just have to
know how the one you're working in behaves.Languages and file-formats where comment removal occurs before
backslash-newline removal:
sh
csh
perl
python
awk
/etc/sudoers
/etc/ipsec.confLanguages and file-formats where backslash-newline removal occurs
before comment removal:
tcl
C
C++
getcap(3)-style files
/etc/pf.confPhilip Guenther
So, when in doubt, comment every line that needs to be comment out,
should work in almost all cases?--
This e-mail may be confidential. You may not copy, forward,
distribute, or, use any part of it. Note, this text has no effective
legal binding on your part. There is no obligation to abide any or all
parts of this, just as any texts appended to e-mail on rest of the
Internet. For more information about disclaimers, please see:
http://www.goldmark.org/jeff/stupid-disclaimers/
The ambiguous case is a comment line that ends with a backslash, so
commenting out all the lines in a group of continued lines works in
all cases, yes.(Beware how you phrase things: "comment every line that needs to be
comment[ed] out" is a tautology, as the meaning of "needs to be
commented out" depends on the file format, which isn't what you wanted
to ask...)Philip Guenther
Interesting. Good to know that. In a small rule set it's easy to
notice, though.I'm able to duplicate the behavior on 4.3 GENERIC#698 i386: comment
lines ending with backslash *are* including the subsequent line(s) as
part of the comment.Regards,
-Lars
| Christoph Lameter | Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures |
| Greg Kroah-Hartman | [PATCH 005/196] Chinese: add translation of SubmittingDrivers |
| Pekka Enberg | Re: [bug] mm/slab.c boot crash in -git, "kernel BUG at mm/slab.c:2103!" |
| Glauber de Oliveira Costa | [PATCH 08/79] [PATCH] use identify_boot_cpu |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| David Miller | [GIT]: Networking |
