1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-24 20:24:15 +02:00

[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
This commit is contained in:
jow 2010-01-19 23:02:11 +00:00
parent baab9a6aec
commit 8084bc3069
2 changed files with 7 additions and 3 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=firewall PKG_NAME:=firewall
PKG_VERSION:=1 PKG_VERSION:=1
PKG_RELEASE:=9 PKG_RELEASE:=10
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk

View File

@ -506,9 +506,13 @@ fw_init() {
uci_set_state firewall core loaded 1 uci_set_state firewall core loaded 1
config_set core loaded 1 config_set core loaded 1
config_foreach fw_check_notrack zone 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 for interface in $INTERFACES; do
fw_addif "$interface" fw_event ifup "$interface"
done done
} }