summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2008-01-27 15:15:12 +0000
committermtm <mtm@FreeBSD.org>2008-01-27 15:15:12 +0000
commit9dd0c210ecfd0edfa9cd114b1873ec8332bab26d (patch)
tree180b1e65f2068d05a9022300a981feb0392fb493 /etc
parent1a411ba3c50475bed34268c2cefdd83518a4a6d9 (diff)
downloadFreeBSD-src-9dd0c210ecfd0edfa9cd114b1873ec8332bab26d.zip
FreeBSD-src-9dd0c210ecfd0edfa9cd114b1873ec8332bab26d.tar.gz
Add a dummynet_enable knob to go with firewall_enable. If this knob
is enabled dummynet(4) is added to the list of required modules. Discussed on: #freebsd-bugbusters (rwatson, trhodes) PR: conf/79196 MFC after: 1 week
Diffstat (limited to 'etc')
-rw-r--r--etc/defaults/rc.conf1
-rw-r--r--etc/rc.d/ipfw8
2 files changed, 9 insertions, 0 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index f6f2267..195facd 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -122,6 +122,7 @@ firewall_nologports="135-139,445 1026,1027 1433,1434" # List of TCP/UDP ports
firewall_nat_enable="NO" # Enable kernel NAT (if firewall_enable == YES)
firewall_nat_interface="" # Public interface or IPaddress to use
firewall_nat_flags="" # Additional configuration parameters
+dummynet_enable="NO" # Load the dummynet(4) module
ip_portrange_first="NO" # Set first dynamically allocated port
ip_portrange_last="NO" # Set last dynamically allocated port
ike_enable="NO" # Enable IKE daemon (usually racoon or isakmpd)
diff --git a/etc/rc.d/ipfw b/etc/rc.d/ipfw
index 115d85a..0af77d8 100644
--- a/etc/rc.d/ipfw
+++ b/etc/rc.d/ipfw
@@ -14,9 +14,17 @@
name="ipfw"
rcvar="firewall_enable"
start_cmd="ipfw_start"
+start_precmd="ipfw_prestart"
stop_cmd="ipfw_stop"
required_modules="ipfw"
+ipfw_prestart()
+{
+ if checkyesno dummynet_enable; then
+ required_modules="$required_modules dummynet"
+ fi
+}
+
ipfw_start()
{
# set the firewall rules script if none was specified
OpenPOWER on IntegriCloud