diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-05-18 20:15:47 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-05-18 20:15:47 +0000 |
commit | 91519d51e9e2198d9afc5f1563084a307a5e7d4d (patch) | |
tree | 838a221ce45a14cdd7417eecc1dcf7a27d3507d9 /package/firewall/files | |
parent | 6b3bfbf943056a9b3f1f528fe2791be463bfe765 (diff) | |
download | openwrt-91519d51e9e2198d9afc5f1563084a307a5e7d4d.tar.gz openwrt-91519d51e9e2198d9afc5f1563084a307a5e7d4d.tar.bz2 openwrt-91519d51e9e2198d9afc5f1563084a307a5e7d4d.zip |
firewall: fix a possible deadlock when the firewall config has syntax errors during restart
SVN-Revision: 21501
Diffstat (limited to 'package/firewall/files')
-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 d0b87a770b..5f06ffe3fb 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 } |