Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configctl service reload all breaks ipfw/traffic shaping #8196

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/etc/rc.ipfw
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ ipfw -q /usr/local/etc/ipfw.rules
if [ ! -f /tmp/ipfw.firstload ]; then
# we need to make sure ipfw is loaded as last
touch /tmp/ipfw.firstload

# Enable ipfw now, to ensure its hooks are loaded, before we fix the ipfw/pf order.
# Without this, ipfw stop/start will disable/re-enable ipfw, but the re-enable part
# is done by /etc/rc.d/ipfw after this, so the hooks will be in the wrong order.
sysctl net.inet.ip.fw.enable=1
sysctl net.inet6.ip6.fw.enable=1

pfctl -d
pfctl -e
fi
6 changes: 6 additions & 0 deletions src/etc/rc.ipfw_stop
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

if [ "$1" = quietstop ]; then
# Force first load behaviour on next ipfw start, to fix ipfw/pf ordering.
rm -f /tmp/ipfw.firstload
fi
1 change: 1 addition & 0 deletions src/opnsense/service/templates/OPNsense/IPFW/rc.conf.d
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@
dummynet_enable="YES"
firewall_enable="{% if shapers or cp_zones %}YES{% else %}NO{% endif %}"
firewall_script="/usr/local/etc/rc.ipfw"
firewall_coscripts="/usr/local/etc/rc.ipfw_stop"
ipfw_defer="YES"