mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-19 12:50:57 +01:00
Correct handling of a chain designator in CLASSIFY rules.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
3081ab1da1
commit
1c535ee0f9
@ -268,12 +268,15 @@ sub process_tc_rule( ) {
|
||||
require_capability ('CONNMARK' , "CONNMARK Rules", '' ) if $connmark;
|
||||
|
||||
} else {
|
||||
fatal_error "Invalid MARK ($originalmark)"
|
||||
unless $remainder || ( $mark =~ /^([0-9a-fA-F]+)$/ and $designator =~ /^([0-9a-fA-F]+)$/ );
|
||||
unless ( $remainder ) {
|
||||
fatal_error "Invalid MARK ($originalmark)" unless $mark =~ /^([0-9a-fA-F]+)$/ and $designator =~ /^([0-9a-fA-F]+)$/;
|
||||
$chain = 'tcpost';
|
||||
$mark = $originalmark;
|
||||
}
|
||||
|
||||
if ( $config{TC_ENABLED} eq 'Internal' || $config{TC_ENABLED} eq 'Shared' ) {
|
||||
$originalmark = join( ':', normalize_hex( $mark ), normalize_hex( $designator ) );
|
||||
fatal_error "Unknown Class ($originalmark)}" unless ( $device = $classids{$originalmark} );
|
||||
fatal_error "Unknown Class ($originalmark)}" unless ( $device = $classids{$mark} );
|
||||
fatal_error "IFB Classes may not be specified in tcrules" if @{$tcdevices{$device}{redirected}};
|
||||
|
||||
unless ( $tcclasses{$device}{hex_value $designator}{leaf} ) {
|
||||
@ -288,11 +291,6 @@ sub process_tc_rule( ) {
|
||||
}
|
||||
}
|
||||
|
||||
unless ( $remainder ) {
|
||||
$chain = 'tcpost';
|
||||
$mark = $originalmark;
|
||||
}
|
||||
|
||||
$classid = 1;
|
||||
$target = 'CLASSIFY --set-class';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user