add counters to drop sets
[firewall-squeep] / common.sh
index 1e40677e555815434c10762f930e8b94af3d7a95..312ecdb0c75e10ce793857cd92c41484615f1264 100644 (file)
--- a/common.sh
+++ b/common.sh
@@ -80,12 +80,13 @@ function insert_setmatch_rules(){
 
 function reload_cidr_sets(){
        local set_name="$1"
+       shift
 
        # init new temporary sets
        echo "updating set '${set_name}'"
 
-       create_set "${set_name}-tmp" hash:net
-       create_set "${set_name}6-tmp" hash:net family inet6
+       create_set "${set_name}-tmp" hash:net "$@"
+       create_set "${set_name}6-tmp" hash:net "$@" family inet6
 
        # populate them
        for sfx in '' .$(hostname -s)
@@ -126,7 +127,7 @@ function add_service_entry(){
 }
 
 function allow_services(){
-       local s proto port
+       local s
        for s in "$@"
        do
                case "${s}" in