Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 May 2012 12:06:24 GMT
From:      Alexandr Matveev <timon@timon.net.nz>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   conf/167822: [ipfw] [patch] start script doesn't load firewall_type if set in rc.conf.d/ipfw
Message-ID:  <201205121206.q4CC6O2w069341@red.freebsd.org>
Resent-Message-ID: <201205121210.q4CCACmf043078@freefall.freebsd.org>

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

>Number:         167822
>Category:       conf
>Synopsis:       [ipfw] [patch] start script doesn't load firewall_type if set in rc.conf.d/ipfw
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 12 12:10:12 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Alexandr Matveev
>Release:        8.2-RELEASE
>Organization:
>Environment:
FreeBSD gen34.hs.shared 8.2-amd64-20110929 FreeBSD 8.2-amd64-20110929 #0: Thu Sep 29 13:51:29 UTC 2011     root@am1.tinder.dev:/usr/obj/usr/src/sys/SERVER8-amd64  amd64
>Description:
If ipfw configured in /etc/rc.conf.d/ipfw like this:
# cat /etc/rc.conf.d/ipfw
firewall_enable="YES"
firewall_type="workstation"

the firewall_type variable will still be set to UNKNOWN as in /etc/defaults/rc.conf, if set in /etc/rc.conf it overriden correctly. The problem only arises if startup command is "restart".
>How-To-Repeat:
Set variables in /etc/rc.conf.d/ipfw:
firewall_enable="YES"
firewall_type="workstation"

Run # service ipfw restart

>Fix:
# diff -u /usr/src/etc/rc.d/ipfw /etc/rc.d/ipfw
--- /usr/src/etc/rc.d/ipfw      2012-01-10 12:46:58.000000000 +0400
+++ /etc/rc.d/ipfw      2012-05-12 15:51:25.000000000 +0400
@@ -102,6 +102,8 @@
                        ${_coscript} quietstop
                fi
        done
+
+       load_rc_config $name
 }
 
 load_rc_config $name

>Release-Note:
>Audit-Trail:
>Unformatted:



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