summaryrefslogtreecommitdiff
path: root/package/firewall
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-01-19 23:02:11 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-01-19 23:02:11 +0000
commit8084bc3069cbedf99e3a30642d0516f6023a1792 (patch)
tree64201eabe23cec7d4b4d74d6d5cbb423d3a261a5 /package/firewall
parentbaab9a6aec814bd57f5a598fefe164f7c87aed6a (diff)
[package] firewall: fix a race condition preventing interfaces from being added to the firewall on boot
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19232 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/firewall')
-rw-r--r--package/firewall/Makefile2
-rwxr-xr-xpackage/firewall/files/uci_firewall.sh8
2 files changed, 7 insertions, 3 deletions
diff --git a/package/firewall/Makefile b/package/firewall/Makefile
index 8d0452602b..abc6020434 100644
--- a/package/firewall/Makefile
+++ b/package/firewall/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=firewall
PKG_VERSION:=1
-PKG_RELEASE:=9
+PKG_RELEASE:=10
include $(INCLUDE_DIR)/package.mk
diff --git a/package/firewall/files/uci_firewall.sh b/package/firewall/files/uci_firewall.sh
index 05fe39beb0..49e5ca8595 100755
--- a/package/firewall/files/uci_firewall.sh
+++ b/package/firewall/files/uci_firewall.sh
@@ -506,9 +506,13 @@ fw_init() {
uci_set_state firewall core loaded 1
config_set core loaded 1
config_foreach fw_check_notrack zone
- INTERFACES="$(sh -c '. /etc/functions.sh; config_load network; config_foreach echo interface')"
+ INTERFACES="$(sh -c '
+ . /etc/functions.sh; config_load network
+ echo_up() { local up; config_get_bool up "$1" up 0; [ $up = 1 ] && echo "$1"; }
+ config_foreach echo_up interface
+ ')"
for interface in $INTERFACES; do
- fw_addif "$interface"
+ fw_event ifup "$interface"
done
}