mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-15 19:01:19 +01:00
Fix limit check on TC mark values
This commit is contained in:
parent
8b2c6853f3
commit
8c033de049
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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};
|
||||||
|
Loading…
Reference in New Issue
Block a user