X-Git-Url: https://git.distorted.org.uk/~mdw/firewall/blobdiff_plain/11732033b49fdd106db47e677bcce8a1ca81460a..6fd217ae2465d315d507e1a58a53d4afa53bde25:/functions.m4 diff --git a/functions.m4 b/functions.m4 index d7b42b2..ebc1661 100644 --- a/functions.m4 +++ b/functions.m4 @@ -130,7 +130,7 @@ errorchain () { clearchain $table:$chain run ip46tables -t $table -A $chain -j LOG \ -m limit --limit 3/minute --limit-burst 10 \ - --log-prefix "fw: $chain " --log-level notice + --log-prefix "fw: $chain " --log-level notice || : run ip46tables -t $table -A $chain -j "$@" \ -m limit --limit 20/second --limit-burst 100 run ip46tables -t $table -A $chain -j DROP @@ -427,9 +427,9 @@ defnetclass () { from=$(( $from + $bit )) done to=$(( ($netclassindex << $BIT_TO) )) - tomask=$(( $MASK_MASK ^ (1 << ($netclassindex + $BIT_MASK)) )) + tomask=$(( $MASK_TO | $MASK_MASK ^ (1 << ($netclassindex + $BIT_MASK)) )) trace "from $name --> set $(printf %08x/%08x $from $frommask)" - trace " to $name --> and $(printf %08x/%08x $to $tomask)" + trace " to $name --> set $(printf %08x/%08x $to $tomask)" ## Now establish the mark-from-NAME and mark-to-NAME chains. clearchain mangle:mark-from-$name mangle:mark-to-$name