mirror of
https://gitlab.com/shorewall/code.git
synced 2025-03-07 11:01:19 +01:00
Correct mark range with shifted mask.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
e908473d29
commit
3f1aeb33be
@ -644,12 +644,13 @@ sub process_tc_rule( ) {
|
||||
$mask = numeric_value $mask;
|
||||
|
||||
my $increment = 1;
|
||||
my $shift = 0;
|
||||
|
||||
$increment <<= 1 until $increment & $mask;
|
||||
$increment <<= 1, $shift++ until $increment & $mask;
|
||||
|
||||
$mask = in_hex $mask;
|
||||
|
||||
my $marks = $mark1val - $markval + 1;
|
||||
my $marks = ( ( $mark1val - $markval ) >> $shift ) + 1;
|
||||
|
||||
for ( my $packet = 0; $packet < $marks; $packet++, $markval += $increment ) {
|
||||
my $match = "-m statistic --mode nth --every $marks --packet $packet ";
|
||||
|
Loading…
Reference in New Issue
Block a user