From 37720d7f259177a8b2e8ee62645b4a159033aa3d Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Wed, 17 Feb 2010 07:41:30 -0800 Subject: [PATCH] Improve assignment of class ID for SFQ classses Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Tc.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Tc.pm b/Shorewall/Perl/Shorewall/Tc.pm index bcf9ffedd..e9f9f7a2b 100644 --- a/Shorewall/Perl/Shorewall/Tc.pm +++ b/Shorewall/Perl/Shorewall/Tc.pm @@ -1334,7 +1334,7 @@ sub setup_traffic_shaping() { } } - my $sfq = in_hex4( ( $devref->{number} << 8 ) | $classnum ); + my $sfq = in_hexp( ( ( hex_value $devref->{number} ) << 8 ) | ( hex_value( $classnum ) & 0xff ) ); if ( $tcref->{leaf} && ! $tcref->{pfifo} ) { emit( "run_tc qdisc add dev $device parent $classid handle $sfq: sfq quantum \$quantum limit $tcref->{limit} perturb 10" );