From 35d15866724be39a3281ed670240acf4caf12461 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Tue, 7 Jun 2011 13:23:12 -0700 Subject: [PATCH] Correct sfq handle assignment Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Tc.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Tc.pm b/Shorewall/Perl/Shorewall/Tc.pm index a6f76823f..9efce5467 100644 --- a/Shorewall/Perl/Shorewall/Tc.pm +++ b/Shorewall/Perl/Shorewall/Tc.pm @@ -1409,7 +1409,7 @@ sub setup_traffic_shaping() { validate_tc_device while read_a_line; } - my $sfq = $devnum; + my $sfq = 0; my $sfqinhex; $devnum = $devnum > 10 ? 10 : 1; @@ -1553,7 +1553,9 @@ sub setup_traffic_shaping() { } if ( $tcref->{leaf} && ! $tcref->{pfifo} ) { - $sfqinhex = in_hexp( ++$sfq); + 1 while $devnums[++$sfq]; + + $sfqinhex = in_hexp( $sfq); if ( $devref->{qdisc} eq 'htb' ) { emit( "run_tc qdisc add dev $device parent $classid handle $sfqinhex: sfq quantum \$quantum limit $tcref->{limit} perturb 10" ); } else {