Correct handling of DYNAMIC_BLACKLIST options

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2016-10-05 16:56:29 -07:00
parent 941604ad01
commit eb6ae5e186
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10
2 changed files with 4 additions and 1 deletions

View File

@ -3813,6 +3813,9 @@ setup_dbl() {
[ -n "$g_disconnect" ] && g_disconnect=src-dst
;;
esac
case $DYNAMIC_BLACKLIST in
ipset*,timeout*)
#
# This utility doesn't need to know about 'timeout=nnn'

View File

@ -8506,7 +8506,7 @@ sub create_load_ipsets() {
emit( ' #',
' # Update the dynamic blacklisting ipset timeout value',
' #',
qq( awk '/create $set/ { sub( /timeout [0-9]+/, \"timeout $globals{DBL_TIMEOUT}\" ) }; {print};' \${VARDIR}/ipsets.save > \${VARDIR}/ipsets.temp),
qq( awk '/create $set/ { sub( /timeout [0-9]+/, "timeout $globals{DBL_TIMEOUT}" ) }; {print};' \${VARDIR}/ipsets.save > \${VARDIR}/ipsets.temp),
' zap_ipsets',
' $IPSET restore < ${VARDIR}/ipsets.temp',
' fi' );