From 8d450e673ccd8391b167a7093c864dd3c70131a7 Mon Sep 17 00:00:00 2001 From: teastep Date: Sun, 19 Apr 2009 19:56:04 +0000 Subject: [PATCH] Change classid generation algorithm git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9939 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/Perl/Shorewall/Tc.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Tc.pm b/Shorewall/Perl/Shorewall/Tc.pm index 6e49ddd54..80ca3a98a 100644 --- a/Shorewall/Perl/Shorewall/Tc.pm +++ b/Shorewall/Perl/Shorewall/Tc.pm @@ -598,8 +598,8 @@ sub validate_tc_class( $$$$$$ ) { $markval = numeric_value( $mark ); fatal_error "Invalid MARK ($markval)" unless defined $markval; + $classnumber = ( $devref->{number} << 10 ) | $mark; fatal_error "Duplicate MARK ($mark)" if $tcref->{$classnumber}; - $classnumber = $devnum . $mark; } } else { fatal_error "Missing MARK" unless $devref->{classify}; @@ -667,7 +667,7 @@ sub validate_tc_class( $$$$$$ ) { $tcref->{pfifo} = $devref->{pfifo} unless $tcref->{flow} || $tcref->{pfifo}; push @tcclasses, "$device:$classnumber"; - + while ( --$occurs ) { fatal_error "Duplicate class number ($classnumber)" if $tcclasses{$device}{++$classnumber};