On 02/06/2012 01:53 AM, Azfar Hashmi wrote:
> Hi everyone,
> 
> I am getting following error with xtables.
> 
> RTNETLINK answers: Invalid argument
> We have an error talking to the kernel
>    ERROR: Command "tc filter add dev eth0 protocol all parent 1:0 prio
> 276 handle 0 fw classid 1:10" Failed

I have reproduced this problem; the 'handle 0' part of the above command
is the cause of the failure.

> 
> iptables-1.4.9.1
> xtables-1.41
> Shorewall-4.4.11.6
> kernel-2.6.32-5-686
> shorewall conf files:

I've attached a patch for Shorewall. Apply it using:

        patch /usr/share/shorewall/Shorewall/tc < FWMARK-11.6.patch

I would be interested to hear which Shorewall and Kernel versions that
you have successfully used this configuration on in the past. I don't
see how it could be dependent on the installed version of xtables-addons.

Thanks,
-Tom
-- 
Tom Eastep        \ When I die, I want to go like my Grandfather who
Shoreline,         \ died peacefully in his sleep. Not screaming like
Washington, USA     \ all of the passengers in his car
http://shorewall.net \________________________________________________
--- Tc.pm.orig	2012-02-06 07:26:55.000000000 -0800
+++ Tc.pm	2012-02-06 07:28:06.000000000 -0800
@@ -1324,7 +1324,8 @@
 	# add filters
 	#
 	unless ( $devref->{classify} ) {
-	    emit "run_tc filter add dev $device protocol all parent $devicenumber:0 prio " . ( $priority | 20 ) . " handle $mark fw classid $classid" if $tcref->{occurs} == 1;
+	    my $handle = $devref->{nextclass}++;
+	    emit "run_tc filter add dev $device protocol all parent $devicenumber:0 prio " . ( $priority | 20 ) . " handle $handle fw classid $classid" if $tcref->{occurs} == 1;
 	}
 
 	emit "run_tc filter add dev $device protocol all prio 1 parent $sfqinhex: handle $classnum flow hash keys $tcref->{flow} divisor 1024" if $tcref->{flow};

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to