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

Re: Class that drops everything

Marco Fabiani wrote:
> I need a class that drops ALL the incoming packtes when a particular
> condition is true

Dropping everything in a class is easy:
tc filter add ... police rate 1kbit burst 1k action drop/drop
(should work with any filter.)

> (in particular when the stats->packets of  the class 1:2 is over a
> certain value, the class 1:3 must drop all the packets in the queue and all
> the incoming packtes)

That's probably a bit more difficult ... in particular, there is no
easily accessible mechanism in place to conditionally discard the
contents of a queue. You'll probably have to write your own qdisc.

- Werner

 / Werner Almesberger, ICA, EPFL, CH       werner.almesberger@ica.epfl.ch /