Re: Re: HTB and filters on many levels - Workaround found

Linux Advanced Routing and Traffic Control

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

 



On Tuesday 16 September 2003 19:59, Steen Suder, privat wrote:
> Daniel Brahneborg wrote:
> > I found a little workaround, but I'm not really happy with it.
>
> <SNIP>
>
> >>I then use iptables -j MARK to set a '1' if the traffic comes from
> >>eth1.  If not, it should end up in 1:2, and 1:1 and 1:2 should be able
> >>to borrow from each other.
> >
> > What I do now is to use ipfilter to set marks on the packets for all six
> > classes, and then set all filters on 1:0.  A bit more work for iptables,
> > but it seems to work.  Is it a bug that a fiter can't be added to a
> > class?
>
> It's by design AFAIK.
> Packets are enqueued at qdiscs and, thus, it is only meaningful to be
> able to attach filters to qdiscs.
>
> I may be wrong though...
>
> Also, the HTB docs instructs the user to attach filters to the root.
You don't have to.  You can add the filters to classes and "stack" them.  If a 
packet is enqueued in the htb qdisc, all filters attached to the root qdisc 
are checked.  If a packet is redirected to a leaf class, it's dequeued in the 
qdisc attached to the class.  If a packet is redirected to a class, the 
filters attached to that class are examined.

In previously htb versions, htb hangs if you redirect a packet to a non-leaf 
class.  That's solved in later versions.

Stef

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

_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
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