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

From: MATOBA Hirozumi <matoba_at_st.rim.or.jp>
Date: Sun, 13 Jul 2003 22:11:15 +0900 (JST)
 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
Received on Sun Jul 13 2003 - 04:11:31 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:14 UTC