IPFW and/or rc rule parsing not working since today's cvsup

MATOBA Hirozumi matoba at st.rim.or.jp
Sun Jul 13 06:11:31 PDT 2003


 On Sun, 13 Jul 2003 13:17:36 +0100 (BST), "Matt" wrote:
| The problem I have is this. In rc.conf I have the following:
| 
| firewall_enable="YES"
| firewall_script="/etc/rc.firewall"
| firewall_type="/etc/ipfw.conf"
| 
| And in /etc/ipfw.conf I have sets of rules one line at a time like:
| 
| add 00010 divert natd all from any to any via xl0
| add 00120 allow tcp from any to any 80 via xl0
| 
| etc.
| 
| This has always worked for me ever since I first started using ipfw on
| fbsd 4.1 and has always worked on current until today's cvsup. Now though
| no rules get loaded.
| 
| If I try what I have always done in the past which is ipfw -q flush &&
| ipfw /etc/ipfw.conf then it tells me:
| 
| usage: ipfw [options]
| do "ipfw -h" or see ipfw manpage for details

If your "/etc/ipfw.conf" has blank line(s), 
then you maybe met the same situation as me. 

The mail that I posted to freebsd-ipfw at freebsd.org is:
<http://docs.freebsd.org/cgi/getmsg.cgi?fetch=65503+0+archive/2003/freebsd-ipfw/20030713.freebsd-ipfw>

There are 3 cases for calling show_usage() in ipfw2.c. 
My case is caught by "if (l == 0)" in ipfw_main(). 
The other cases are caught by "if (ac == 0)"
and by "while ((ch = getopt(ac, av, "acdefhnNqs:STtv")) != -1)
                switch (ch) {
                  ...
                  default:". 

-- 
matoba at st.rim.or.jp


More information about the freebsd-current mailing list