mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-15 04:04:10 +01:00
Clean up blacklist loading change
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4784 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
31232b5e82
commit
0453d79315
@ -1051,7 +1051,7 @@ compile_refresh_firewall()
|
||||
#
|
||||
# Blacklist
|
||||
#
|
||||
refresh_blacklist
|
||||
refresh_blacklist Yes
|
||||
|
||||
ecn=$(find_file ecn)
|
||||
|
||||
@ -3485,14 +3485,12 @@ setup_blacklist() {
|
||||
#
|
||||
# Refresh the Black List
|
||||
#
|
||||
refresh_blacklist() {
|
||||
refresh_blacklist() # $1 = Yes means flush the blacklist
|
||||
{
|
||||
local f=$(find_file blacklist)
|
||||
local disposition=$BLACKLIST_DISPOSITION
|
||||
local indent="$INDENT"
|
||||
|
||||
progress_message2 "$DOING Black List..."
|
||||
save_progress_message "Loading Black List..."
|
||||
|
||||
strip_file blacklist $f
|
||||
|
||||
[ "$disposition" = REJECT ] && disposition=reject
|
||||
@ -3500,7 +3498,12 @@ refresh_blacklist() {
|
||||
save_command "if chain_exists blacklst; then"
|
||||
INDENT="$INDENT "
|
||||
|
||||
run_iptables -F blacklst
|
||||
if [ "$1" = Yes ]; then
|
||||
save_command progress_message2 \"Refreshing Black List...\"
|
||||
run_iptables -F blacklst
|
||||
else
|
||||
save_command progress_message2 \"Loading Black List...\"
|
||||
fi
|
||||
|
||||
save_command load_blacklist
|
||||
|
||||
@ -5596,7 +5599,7 @@ __EOF__
|
||||
append_file start
|
||||
|
||||
if [ -n "$DELAYBLACKLISTLOAD" -a -s ${TMP_DIR}/blacklist ]; then
|
||||
refresh_blacklist
|
||||
refresh_blacklist No
|
||||
save_command
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user