From 6c00f72f448b36e85b9b5d68acd7018e7f44ecff Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 10 Apr 2016 18:09:41 -0700 Subject: [PATCH] Create ipsets with the 'counters' option Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Chains.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 618dbef78..60590d2a9 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -8255,7 +8255,7 @@ sub ensure_ipset( $ ) { if ( have_capability 'IPSET_V5' ) { 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( \$IPSET -N $set hash:net family inet timeout 0) , + qq( \$IPSET -N $set hash:net family inet timeout 0 counters) , qq( fi) ); } else { emit ( qq( if ! qt \$IPSET -L $set -n; then) , @@ -8266,7 +8266,7 @@ sub ensure_ipset( $ ) { } else { 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( \$IPSET -N $set hash:net family inet6 timeout 0) , + qq( \$IPSET -N $set hash:net family inet6 timeout 0 counters) , qq( fi) ); } }