diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-05-17 17:20:37 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-05-17 17:20:37 +0000 |
commit | a4edacd32985907c20cb4315ce380d2f04090943 (patch) | |
tree | 78284a64d5bc464b63484993183155cd0a12d7eb | |
parent | fa11019822ae97b23fdc341aaaf0f27583e77c37 (diff) | |
download | master-187ad058-a4edacd32985907c20cb4315ce380d2f04090943.tar.gz master-187ad058-a4edacd32985907c20cb4315ce380d2f04090943.tar.bz2 master-187ad058-a4edacd32985907c20cb4315ce380d2f04090943.zip |
[package] firewall: properly clear hooks in fw_stop() to prevent extensions from being called twice after fw_restart()
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21488 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/firewall/files/lib/core.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/package/firewall/files/lib/core.sh b/package/firewall/files/lib/core.sh index bf44231fb0..f37b1e6961 100644 --- a/package/firewall/files/lib/core.sh +++ b/package/firewall/files/lib/core.sh @@ -66,6 +66,11 @@ fw_stop() { uci_revert_state firewall config_clear + + local h + for h in $FW_HOOKS; do unset $h; done + + unset FW_HOOKS unset FW_INITIALIZED } @@ -126,8 +131,10 @@ fw_init() { . $file for hk in $hooks; do for pp in pre post; do - type ${lib}_${pp}_${hk}_cb >/dev/null && + type ${lib}_${pp}_${hk}_cb >/dev/null && { append FW_CB_${pp}_${hk} ${lib} + append FW_HOOKS FW_CB_${pp}_${hk} + } done done done |