mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-18 11:38:14 +01:00
Allow fwmarks with 'classify' interfaces
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
24ddae6ede
commit
9d3766b77f
@ -1099,22 +1099,18 @@ sub validate_tc_class( ) {
|
|||||||
my $markval = 0;
|
my $markval = 0;
|
||||||
|
|
||||||
if ( $mark ne '-' ) {
|
if ( $mark ne '-' ) {
|
||||||
if ( $devref->{classify} ) {
|
fatal_error "MARK may not be specified when TC_BITS=0" unless $config{TC_BITS};
|
||||||
warning_message "INTERFACE $device has the 'classify' option - MARK value ($mark) ignored";
|
|
||||||
|
$markval = numeric_value( $mark );
|
||||||
|
fatal_error "Invalid MARK ($markval)" unless defined $markval;
|
||||||
|
|
||||||
|
fatal_error "Invalid Mark ($mark)" unless $markval <= $globals{TC_MAX};
|
||||||
|
|
||||||
|
if ( $classnumber ) {
|
||||||
|
fatal_error "Duplicate Class NUMBER ($classnumber)" if $tcref->{$classnumber};
|
||||||
} else {
|
} else {
|
||||||
fatal_error "MARK may not be specified when TC_BITS=0" unless $config{TC_BITS};
|
$classnumber = $config{TC_BITS} >= 14 ? $devref->{nextclass}++ : hex_value( $devnum . $markval );
|
||||||
|
fatal_error "Duplicate MARK ($mark)" if $tcref->{$classnumber};
|
||||||
$markval = numeric_value( $mark );
|
|
||||||
fatal_error "Invalid MARK ($markval)" unless defined $markval;
|
|
||||||
|
|
||||||
fatal_error "Invalid Mark ($mark)" unless $markval <= $globals{TC_MAX};
|
|
||||||
|
|
||||||
if ( $classnumber ) {
|
|
||||||
fatal_error "Duplicate Class NUMBER ($classnumber)" if $tcref->{$classnumber};
|
|
||||||
} else {
|
|
||||||
$classnumber = $config{TC_BITS} >= 14 ? $devref->{nextclass}++ : hex_value( $devnum . $markval );
|
|
||||||
fatal_error "Duplicate MARK ($mark)" if $tcref->{$classnumber};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
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