mirror of https://github.com/hak5/openwrt-owl.git
firewall: properly clear hooks in fw_stop() to prevent extensions from being called twice after fw_restart()
SVN-Revision: 21488owl
parent
de15765a37
commit
18a79362e9
|
@ -66,6 +66,11 @@ fw_stop() {
|
||||||
|
|
||||||
uci_revert_state firewall
|
uci_revert_state firewall
|
||||||
config_clear
|
config_clear
|
||||||
|
|
||||||
|
local h
|
||||||
|
for h in $FW_HOOKS; do unset $h; done
|
||||||
|
|
||||||
|
unset FW_HOOKS
|
||||||
unset FW_INITIALIZED
|
unset FW_INITIALIZED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,8 +131,10 @@ fw_init() {
|
||||||
. $file
|
. $file
|
||||||
for hk in $hooks; do
|
for hk in $hooks; do
|
||||||
for pp in pre post; 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_CB_${pp}_${hk} ${lib}
|
||||||
|
append FW_HOOKS FW_CB_${pp}_${hk}
|
||||||
|
}
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue