alex wrote:
Ok, thank you very much again.
I will be much obliged to you if you give me a sign when make this fix
(now i changed my tcrules manually).
Here's a (very) lightly-tested patch. -Tom -- Tom Eastep \ Nothing is foolproof to a sufficiently talented fool Shoreline, \ http://shorewall.net Washington USA \ [EMAIL PROTECTED] PGP Public Key \ https://lists.shorewall.net/teastep.pgp.key
Index: Shorewall/Tc.pm
===================================================================
--- Shorewall/Tc.pm (revision 8494)
+++ Shorewall/Tc.pm (working copy)
@@ -476,7 +476,7 @@
$tcclasses{$device} = {} unless $tcclasses{$device};
my $tcref = $tcclasses{$device};
- my $markval;
+ my $markval = 0;
if ( $mark ne '-' ) {
if ( $devref->{classify} ) {
@@ -497,7 +497,8 @@
$tcref->{$classnumber} = { tos => [] ,
rate => convert_rate( $full, $rate, 'RATE' ) ,
ceiling => convert_rate( $full, $ceil, 'CEIL' ) ,
- priority => $prio eq '-' ? 1 : $prio
+ priority => $prio eq '-' ? 1 : $prio ,
+ mark => $markval
};
$tcref = $tcref->{$classnumber};
@@ -769,11 +770,12 @@
my $lastdevice = '';
for my $class ( @tcclasses ) {
- my ( $device, $mark ) = split /:/, $class;
+ my ( $device, $classnum ) = split /:/, $class;
my $devref = $tcdevices{$device};
- my $tcref = $tcclasses{$device}{$mark};
+ my $tcref = $tcclasses{$device}{$classnum};
+ my $mark = $tcref->{mark};
my $devicenumber = $devref->{number};
- my $classid = join( '', $devicenumber, ':', $mark);
+ my $classid = join( '', $devicenumber, ':', $classnum);
my $rate = "$tcref->{rate}kbit";
my $quantum = calculate_quantum $rate, calculate_r2q( $devref->{out_bandwidth} );
my $dev = chain_base $device;
@@ -793,7 +795,7 @@
emit ( "[ \$${dev}_mtu -gt $quantum ] && quantum=\$${dev}_mtu || quantum=$quantum",
"run_tc class add dev $device parent $devref->{number}:1 classid $classid htb rate $rate ceil $tcref->{ceiling}kbit prio $tcref->{priority} \$${dev}_mtu1 quantum \$quantum",
- "run_tc qdisc add dev $device parent $classid handle ${mark}: sfq perturb 10"
+ "run_tc qdisc add dev $device parent $classid handle ${classnum}: sfq perturb 10"
);
#
# add filters
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________ Shorewall-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/shorewall-users
