net-sched: sch_cbq: avoid infinite loop
authorEric Dumazet <edumazet@google.com>
Tue, 11 Sep 2012 13:11:12 +0000 (13:11 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Sep 2012 02:20:43 +0000 (22:20 -0400)
commitbdfc87f7d1e253e0a61e2fc6a75ea9d76f7fc03a
treecfaf95ce5aa47eee32b503aa20896c79e5c8f7c2
parentb48d6f8bed430922f78f648d1f73f7c1591e472c
net-sched: sch_cbq: avoid infinite loop

Its possible to setup a bad cbq configuration leading to
an infinite loop in cbq_classify()

DEV_OUT=eth0
ICMP="match ip protocol 1 0xff"
U32="protocol ip u32"
DST="match ip dst"
tc qdisc add dev $DEV_OUT root handle 1: cbq avpkt 1000 \
bandwidth 100mbit
tc class add dev $DEV_OUT parent 1: classid 1:1 cbq \
rate 512kbit allot 1500 prio 5 bounded isolated
tc filter add dev $DEV_OUT parent 1: prio 3 $U32 \
$ICMP $DST 192.168.3.234 flowid 1:

Reported-by: Denys Fedoryschenko <denys@visp.net.lb>
Tested-by: Denys Fedoryschenko <denys@visp.net.lb>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_cbq.c