Re: tc filter using MASKs in mark

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 24, 2007 at 01:11:35AM +0200, ArcosCom Linux User wrote:
> Hi,
>    I'm having a problem with filtering marked packet with tc.
> 
>    I'm trying to run this:
> 
> /sbin/tc filter add dev imq0 parent 1:0 protocol ip prio 8 handle
> 0x7/0x000f fw classid 1:8
> 
> But the response is:
> 
> Illegal "handle"
> 
> 
> Typing the handle without masked mark is working, but I have a
> configuration were I need 2 mark types and I'm using masks:
>    Multiple outgoing interfaces (using 0xf000 mask to know the ip route
> filter to allow specific interface for the outcoming traffic).
>    QoS (using 0x000f) to know the destination class for the flow.
> 
> Perhaps I have an incorrect syntax typing the masked handle, but I don't
> find any information about how to type correctly the masked handle with
> "tc filter" and I'm trying an "ip analogous" syntax.
> 
> The ip/tc utils versions I'm using are 2.6.20.
> 
> Anybody could help me with this "syntax problem"?
> 
> Thanks

I think the fw classifier does not support masks. However, you can also
use u32 filter to match marks, and it does support matching with mask.
AFAIK, the support for matching marks have to be enabled in the kernel.

 CONFIG_CLS_U32_MARK=y

And the syntax is like this:

 tc filter add dev imq0 protocol ip prio 8 parent 1:0 u32 match mark \
 0x7 0x000f flowid 1:8

Regards,
 -MM
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux