forked from extern/shorewall_code
Create ipsets with the 'counters' option
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
8dc88898c8
commit
6c00f72f44
@ -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) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user