Create ipsets with the 'counters' option

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2016-04-10 18:09:41 -07:00
parent 8dc88898c8
commit 6c00f72f44

View File

@ -8255,7 +8255,7 @@ sub ensure_ipset( $ ) {
if ( have_capability 'IPSET_V5' ) { if ( have_capability 'IPSET_V5' ) {
emit ( qq( if ! qt \$IPSET -L $set -n; then) , emit ( qq( if ! qt \$IPSET -L $set -n; then) ,
qq( error_message "WARNING: ipset $set does not exist; creating it as an hash:net set") , qq( error_message "WARNING: ipset $set does not exist; creating it as an hash:net set") ,
qq( \$IPSET -N $set hash:net family inet timeout 0) , qq( \$IPSET -N $set hash:net family inet timeout 0 counters) ,
qq( fi) ); qq( fi) );
} else { } else {
emit ( qq( if ! qt \$IPSET -L $set -n; then) , emit ( qq( if ! qt \$IPSET -L $set -n; then) ,
@ -8266,7 +8266,7 @@ sub ensure_ipset( $ ) {
} else { } else {
emit ( qq( if ! qt \$IPSET -L $set -n; then) , emit ( qq( if ! qt \$IPSET -L $set -n; then) ,
qq( error_message "WARNING: ipset $set does not exist; creating it as an hash:net set") , qq( error_message "WARNING: ipset $set does not exist; creating it as an hash:net set") ,
qq( \$IPSET -N $set hash:net family inet6 timeout 0) , qq( \$IPSET -N $set hash:net family inet6 timeout 0 counters) ,
qq( fi) ); qq( fi) );
} }
} }