From: Mark Wooding Date: Mon, 12 Mar 2012 00:02:05 +0000 (+0000) Subject: functions.m4: Publish the per-class forwarding bitmasks. X-Git-Url: https://git.distorted.org.uk/~mdw/firewall/commitdiff_plain/3b250fe6986bd168aa7e4f46336b3a43b2735b37 functions.m4: Publish the per-class forwarding bitmasks. Just a matter of renaming the variables which hold them. --- diff --git a/functions.m4 b/functions.m4 index a8ed16b..0ebba30 100644 --- a/functions.m4 +++ b/functions.m4 @@ -393,7 +393,7 @@ defnetclass () { trace "netclass $name = $netclassindex" eval from_$name=$(( $netclassindex << $BIT_FROM )) eval to_$name=$(( $netclassindex << $BIT_TO )) - eval _mask_$name=$(( 1 << ($netclassindex + $BIT_MASK) )) + eval fwd_$name=$(( 1 << ($netclassindex + $BIT_MASK) )) nets="$nets $name" ;; 2) @@ -403,7 +403,7 @@ defnetclass () { from=$(( ($netclassindex << $BIT_FROM) )) frommask=$(( $MASK_FROM | $MASK_MASK )) for net; do - eval bit=\$_mask_$net + eval bit=\$fwd_$net from=$(( $from + $bit )) done to=$(( ($netclassindex << $BIT_TO) ))