1
0

Allow wide MARK values in tcclasses when WIDE_TC_MARKS=Yes

This commit is contained in:
Tom Eastep 2009-11-21 07:54:42 -08:00
parent c5bb493b29
commit bce4d51a18
3 changed files with 7 additions and 2 deletions
Shorewall

View File

@ -648,11 +648,11 @@ sub validate_tc_class( ) {
if ( $devref->{classify} ) { if ( $devref->{classify} ) {
warning_message "INTERFACE $device has the 'classify' option - MARK value ($mark) ignored"; warning_message "INTERFACE $device has the 'classify' option - MARK value ($mark) ignored";
} else { } else {
fatal_error "Invalid Mark ($mark)" unless $mark =~ /^([0-9]+|0x[0-9a-fA-F]+)$/ && numeric_value( $mark ) <= 0xff;
$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 );
if ( $classnumber ) { if ( $classnumber ) {
fatal_error "Duplicate Class NUMBER ($classnumber)" if $tcref->{$classnumber}; fatal_error "Duplicate Class NUMBER ($classnumber)" if $tcref->{$classnumber};
} else { } else {

View File

@ -25,6 +25,8 @@ Changes in Shorewall 4.4.4
12) Fix class number assignment when WIDE_TC_MARKS=Yes 12) Fix class number assignment when WIDE_TC_MARKS=Yes
13) Allow wide marks in tcclasses when WIDE_TC_MARKS=Yes
Changes in Shorewall 4.4.3 Changes in Shorewall 4.4.3
1) Move Debian INITLOG initialization to /etc/default/shorewall 1) Move Debian INITLOG initialization to /etc/default/shorewall

View File

@ -207,6 +207,9 @@ Shorewall 4.4.4
Note that the class ID of the class being added is a duplicate of Note that the class ID of the class being added is a duplicate of
the parent's class ID. the parent's class ID.
Also, when TC_WIDE_MARKS=Yes, values > 255 in the MARK column of
/etc/shorewall/tcclasses were rejected.
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
K N O W N P R O B L E M S R E M A I N I N G K N O W N P R O B L E M S R E M A I N I N G
---------------------------------------------------------------------------- ----------------------------------------------------------------------------