Description: Upstream changes introduced in version 4.4.11.6-3+squeeze1
 This patch has been created by dpkg-source during the package build.
 Here's the last changelog entry, hopefully it gives details on why
 those changes were made:
 .
 shorewall (4.4.11.6-3+squeeze1) stable-proposed-updates; urgency=low
 .
   * Install missing /usr/share/shorewall/helpers (Closes: #646112)
 .
 The person named in the Author field signed this changelog entry.
Author: Roberto C. Sanchez <roberto@connexer.com>
Bug-Debian: http://bugs.debian.org/646112

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- shorewall-4.4.11.6.orig/known_problems.txt
+++ shorewall-4.4.11.6/known_problems.txt
@@ -147,3 +147,17 @@
     showed an empty log when issued to one of the -lite packages.
 
     Corrected in Shorewall 4.4.11.6
+
+22) If 10 or more interfaces are configured in Complex Traffic Shaping
+    (/etc/shorewall/tcdevices), the following compilation diagnostic
+    is issued:
+
+        Argument "a" isn't numeric in sprintf at
+	/usr/share/shorewall/Shorewall/Config.pm line 893.
+ 
+    and an invalid TC configuration is generated.
+
+    A fix is available at
+    http://shorewall.git.sourceforge.net/git/gitweb.cgi?p=shorewall/shorewall;a=commitdiff;h=20bb781874c739c01b798d2db31b6c1d9cfefe96
+
+
--- shorewall-4.4.11.6.orig/changelog.txt
+++ shorewall-4.4.11.6/changelog.txt
@@ -1,3 +1,7 @@
+Changes post 4.4.11.6
+
+1) Fix 10+ TC Interfaces.
+
 Changes in Shorewall 4.4.11.6
 
 1)  Fix log reading in -lite packages.
--- shorewall-4.4.11.6.orig/releasenotes.txt
+++ shorewall-4.4.11.6/releasenotes.txt
@@ -218,6 +218,17 @@ VI.   PROBLEMS CORRECTED AND NEW FEATURE
 I I I.  P R O B L E M S   C O R R E C T E D   I N   T H I S  R E L E A S E
 ----------------------------------------------------------------------------
 
+Post-4.4.11.6
+
+1)  Previously, if 10 or more interfaces were configured in Complex
+    Traffic Shaping (/etc/shorewall/tcdevices), the following
+    compilation diagnostic was generated:
+
+        Argument "a" isn't numeric in sprintf at
+	/usr/share/shorewall/Shorewall/Config.pm line 893.
+
+    and an invalid TC configuration was generated.
+
 4.4.11.6
 
 1)  The Shorewall-lite and Shorewall6-lite Debian init scripts contained a
--- shorewall-4.4.11.6.orig/Perl/Shorewall/Tc.pm
+++ shorewall-4.4.11.6/Perl/Shorewall/Tc.pm
@@ -1279,7 +1279,7 @@ sub setup_traffic_shaping() {
 	my $tcref    = $tcclasses{$device}{$decimalclassnum};
 	my $mark     = $tcref->{mark};
 	my $devicenumber  = in_hexp $devref->{number};
-	my $classid  = join( ':', in_hexp $devicenumber, $classnum);
+	my $classid  = join( ':', $devicenumber, $classnum);
 	my $rate     = "$tcref->{rate}kbit";
 	my $quantum  = calculate_quantum $rate, calculate_r2q( $devref->{out_bandwidth} );
 
@@ -1304,15 +1304,15 @@ sub setup_traffic_shaping() {
 	emit ( "[ \$${dev}_mtu -gt $quantum ] && quantum=\$${dev}_mtu || quantum=$quantum" );
 
 	if ( $devref->{qdisc} eq 'htb' ) {
-	    emit ( "run_tc class add dev $device parent $devref->{number}:$parent classid $classid htb rate $rate ceil $tcref->{ceiling}kbit prio $tcref->{priority} \$${dev}_mtu1 quantum \$quantum" );
+	    emit ( "run_tc class add dev $device parent $devicenumber:$parent classid $classid htb rate $rate ceil $tcref->{ceiling}kbit prio $tcref->{priority} \$${dev}_mtu1 quantum \$quantum" );
 	} else {
 	    my $dmax = $tcref->{dmax};
 
 	    if ( $dmax ) {
 		my $umax = $tcref->{umax} ? "$tcref->{umax}b" : "\${${dev}_mtu}b";
-		emit ( "run_tc class add dev $device parent $devref->{number}:$parent classid $classid hfsc sc umax $umax dmax ${dmax}ms rate $rate ul rate $tcref->{ceiling}kbit" );
+		emit ( "run_tc class add dev $device parent $devicenumber:$parent classid $classid hfsc sc umax $umax dmax ${dmax}ms rate $rate ul rate $tcref->{ceiling}kbit" );
 	    } else {
-		emit ( "run_tc class add dev $device parent $devref->{number}:$parent classid $classid hfsc sc rate $rate ul rate $tcref->{ceiling}kbit" );
+		emit ( "run_tc class add dev $device parent $devicenumber:$parent classid $classid hfsc sc rate $rate ul rate $tcref->{ceiling}kbit" );
 	    }
 	}
 
