Re: How to match all packets with a tc filter

Linux Advanced Routing and Traffic Control

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

 



On Thursday 05 September 2002 18:49, Marcus Sundberg wrote:
> Jose Luis Domingo Lopez <lartc@24x7linux.com> writes:
> > On Wednesday, 04 September 2002, at 20:27:27 +0200,
> >
> > Stef Coene wrote:
> > > > Yeah I know, but I use several different qdiscs and would prefer to
> > > > have a general way to do it with filters.
> > >
> > > The I think the u32 trick is the best you can do.
> >
> > Or tag all traffic with ipchains/iptables and add a tc filter of type
> > fwmark matching this tag.
>
> I'm already using fwmark matching for everything except the default
> filter. Because fwmark doesn't have a mask but only does exact
> matches I can't use that for the default filter without generating
> lots of extra iptables rules.
Only one iptables rule is needed.  As first rule in the iptables list, match 
all packets with 1.  Then process the rules in the iptables list and mark the 
packets with an other mark if you want.  All packets not matched again, will 
keep the mark 1.  This is your "default" mark.  
You only need a filter to put the packets marked with 1 in a default class and 
you have your default filter.


Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


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