X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=package%2Ffirewall%2Ffiles%2Flib%2Fcore.sh;h=f37b1e69612b03c4c794b43b58aa52f817387ff1;hp=bf44231fb0e7a803f206705b09e50c44d0063775;hb=defc4791a34059267ec652ada2a57a81c6b989b7;hpb=8a4bc2af459e5c01ab551371eb8372ab12ca6222 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