Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Dec 1997 01:36:43 +0100
From:      Jos Backus <jos@jos.mp-c.com>
To:        freebsd-hackers@freebsd.org
Subject:   Teeny-weeny /usr/src/sbin/ipfw/ipfw.c patch
Message-ID:  <19971205003643.2067.qmail@jos.mp-c.com>

next in thread | raw e-mail | index | archive | help

*** ipfw.c.dist Fri Dec  5 01:29:49 1997
--- ipfw.c      Fri Dec  5 01:30:20 1997
***************
*** 1197,1202 ****
--- 1197,1203 ----
                while (fgets(buf, BUFSIZ, f)) {

                        lineno++;
+                       if (buf[0]=='#'||buf[0]=='\n') continue;
                        sprintf(linename, "Line %d", lineno);
                        args[0] = linename;

This allows comments/empty lines in a firewall rule file (when using the
``ipfw rulefile'' syntax), which seems pretty handy (at least to me --
documenting rules and all that).

If this is deemed a worthwhile enhancement, maybe one of the committers could
do the honors? Thanks!

Groetjes,
--
Jos Backus                 _/  _/_/_/        "Modularity is not a hack."
                          _/  _/   _/                -- D. J. Bernstein
                         _/  _/_/_/             
                    _/  _/  _/    _/
jbackus@plex.nl     _/_/   _/_/_/            #include <std/disclaimer.h>



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