Fix limit check on TC mark values

This commit is contained in:
Tom Eastep 2009-11-28 14:05:27 -08:00
parent 8b2c6853f3
commit 8c033de049
2 changed files with 2 additions and 4 deletions

View File

@ -423,9 +423,7 @@ sub add_commands ( $$;@ ) {
my $chainref = shift @_; my $chainref = shift @_;
my $indentation = ' ' x $chainref->{cmdlevel}; my $indentation = ' ' x $chainref->{cmdlevel};
for ( @_ ) { push @{$chainref->{rules}}, join ('', $indentation , $_ ) for @_;
push @{$chainref->{rules}}, join ('', $indentation , $_ );
}
$chainref->{referenced} = 1; $chainref->{referenced} = 1;
} }

View File

@ -651,7 +651,7 @@ sub validate_tc_class( ) {
$markval = numeric_value( $mark ); $markval = numeric_value( $mark );
fatal_error "Invalid MARK ($markval)" unless defined $markval; fatal_error "Invalid MARK ($markval)" unless defined $markval;
fatal_error "Invalid Mark ($mark)" unless $markval <= ( $config{WIDE_TC_MARKS} ? 0xffff : 0xff ); fatal_error "Invalid Mark ($mark)" unless $markval <= ( $config{WIDE_TC_MARKS} ? 0x3fff : 0xff );
if ( $classnumber ) { if ( $classnumber ) {
fatal_error "Duplicate Class NUMBER ($classnumber)" if $tcref->{$classnumber}; fatal_error "Duplicate Class NUMBER ($classnumber)" if $tcref->{$classnumber};