diff options
author | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-05-18 20:15:47 +0000 |
---|---|---|
committer | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-05-18 20:15:47 +0000 |
commit | 0b44419f282bff17b9504da361910edc9c6f7758 (patch) | |
tree | 0f17b5b26c4ef9065804a65777e29a0fc2e3855a /package | |
parent | 73dab2e7cf57212fd880e754b21221670dcb53ad (diff) |
[package] firewall: fix a possible deadlock when the firewall config has syntax errors during restart
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21501 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r-- | package/firewall/files/lib/core.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/package/firewall/files/lib/core.sh b/package/firewall/files/lib/core.sh index d0b87a770..5f06ffe3f 100644 --- a/package/firewall/files/lib/core.sh +++ b/package/firewall/files/lib/core.sh @@ -8,14 +8,15 @@ include /lib/network fw_start() { fw_init - lock /var/lock/firewall.start - FW_DEFAULTS_APPLIED= fw_is_loaded && { echo "firewall already loaded" >&2 exit 1 } + + lock /var/lock/firewall.start + uci_set_state firewall core "" firewall_state fw_clear DROP @@ -93,6 +94,7 @@ fw_die() { echo "Error:" "$@" >&2 fw_log error "$@" fw_stop + lock -u /var/lock/firewall.start exit 1 } |