Fix class number assignment when WIDE_TC_MARKS=Yes

This commit is contained in:
Tom Eastep 2009-11-20 12:37:03 -08:00
parent d7cde44a9e
commit c5b2e6105c
3 changed files with 34 additions and 3 deletions

View File

@ -153,7 +153,7 @@ our @deferred_rules;
#
# TCDevices Table
#
# %tcdevices { <interface> -> {in_bandwidth => <value> ,
# %tcdevices { <interface> => {in_bandwidth => <value> ,
# out_bandwidth => <value> ,
# number => <number>,
# classify => 0|1
@ -655,7 +655,7 @@ sub validate_tc_class( ) {
if ( $classnumber ) {
fatal_error "Duplicate Class NUMBER ($classnumber)" if $tcref->{$classnumber};
} else {
$classnumber = $config{WIDE_TC_MARKS} ? $tcref->{nextclass}++ : hex_value( $devnum . $markval );
$classnumber = $config{WIDE_TC_MARKS} ? $devref->{nextclass}++ : hex_value( $devnum . $markval );
fatal_error "Duplicate MARK ($mark)" if $tcref->{$classnumber};
}
}

View File

@ -22,3 +22,20 @@
state of the provider's interface.
Will be corrected in Shorewall 4.4.4.
4) When TC_WIDE_MARKS=Yes and class numbers are not explicitly
specified in /etc/shorewall/tcclasses, duplicate class numbers
result. A typical error message is:
ERROR: Command "tc class add dev eth3 parent 1:1 classid
1:1 htb rate 1024kbit ceil 100000kbit prio 1 quantum 1500"
Failed
Note that the class ID of the class being added is a duplicate of
the parent's class ID.
You can work around this problem by explicitly specifying class
numbers in the INTERFACE column (e.g., 'eth0:2' or '1:2').
Will be corrected in Shorewall 4.4.4.

View File

@ -177,7 +177,21 @@ Shorewall 4.4.3 Patch release 1.
P R O B L E M S C O R R E C T E D I N 4 . 4 . 3 . 1
----------------------------------------------------------------------------
None.
1) Previously, the compiler generated an incorrect test for interface
availability in the generated code for adding route rules. The
result was that the rules were always added, regardless of the
state of the provider's interface. Now, the rules are only added
when the interface is available.
2) When TC_WIDE_MARKS=Yes and class numbers are not explicitly
specified in /etc/shorewall/tcclasses, duplicate class numbers
result. A typical error message is:
ERROR: Command "tc class add dev eth3 parent 1:1 classid
1:1 htb rate 1024kbit ceil 100000kbit prio 1 quantum 1500"
Failed
Note that the class ID of the class being added is a duplicate of
the parent's class ID.
----------------------------------------------------------------------------
P R O B L E M S C O R R E C T E D I N 4 . 4 . 3