From 3b0f3dd8647a93d4d05a6d4f49d7e70fc7f57de7 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Tue, 11 Dec 2012 10:23:42 +0000 Subject: [PATCH] functions.m4: Correctly clear `to' network field in packet mark. I thibk this worked before anyway, but it's good to fix it properly. --- functions.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions.m4 b/functions.m4 index d7b42b2..f75d16e 100644 --- a/functions.m4 +++ b/functions.m4 @@ -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 -- 2.11.0