mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-25 07:03:21 +02:00
[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
This commit is contained in:
parent
73dab2e7cf
commit
0b44419f28
@ -8,14 +8,15 @@ include /lib/network
|
|||||||
fw_start() {
|
fw_start() {
|
||||||
fw_init
|
fw_init
|
||||||
|
|
||||||
lock /var/lock/firewall.start
|
|
||||||
|
|
||||||
FW_DEFAULTS_APPLIED=
|
FW_DEFAULTS_APPLIED=
|
||||||
|
|
||||||
fw_is_loaded && {
|
fw_is_loaded && {
|
||||||
echo "firewall already loaded" >&2
|
echo "firewall already loaded" >&2
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lock /var/lock/firewall.start
|
||||||
|
|
||||||
uci_set_state firewall core "" firewall_state
|
uci_set_state firewall core "" firewall_state
|
||||||
|
|
||||||
fw_clear DROP
|
fw_clear DROP
|
||||||
@ -93,6 +94,7 @@ fw_die() {
|
|||||||
echo "Error:" "$@" >&2
|
echo "Error:" "$@" >&2
|
||||||
fw_log error "$@"
|
fw_log error "$@"
|
||||||
fw_stop
|
fw_stop
|
||||||
|
lock -u /var/lock/firewall.start
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user