Commit 5cc3937b authored by Martin Devera's avatar Martin Devera Committed by David S. Miller

[NET]: Make sure that class selected by priority is a leaf in HTB scheduler.

parent cd4eb2e9
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
#define HTB_HYSTERESIS 1/* whether to use mode hysteresis for speedup */ #define HTB_HYSTERESIS 1/* whether to use mode hysteresis for speedup */
#define HTB_QLOCK(S) spin_lock_bh(&(S)->dev->queue_lock) #define HTB_QLOCK(S) spin_lock_bh(&(S)->dev->queue_lock)
#define HTB_QUNLOCK(S) spin_unlock_bh(&(S)->dev->queue_lock) #define HTB_QUNLOCK(S) spin_unlock_bh(&(S)->dev->queue_lock)
#define HTB_VER 0x3000e /* major must be matched with number suplied by TC as version */ #define HTB_VER 0x3000f /* major must be matched with number suplied by TC as version */
#if HTB_VER >> 16 != TC_HTB_PROTOVER #if HTB_VER >> 16 != TC_HTB_PROTOVER
#error "Mismatched sch_htb.c and pkt_sch.h" #error "Mismatched sch_htb.c and pkt_sch.h"
...@@ -308,7 +308,7 @@ static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch) ...@@ -308,7 +308,7 @@ static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch)
rules in it */ rules in it */
if (skb->priority == sch->handle) if (skb->priority == sch->handle)
return HTB_DIRECT; /* X:0 (direct flow) selected */ return HTB_DIRECT; /* X:0 (direct flow) selected */
if ((cl = htb_find(skb->priority,sch)) != NULL) if ((cl = htb_find(skb->priority,sch)) != NULL && cl->level == 0)
return cl; return cl;
tcf = q->filter_list; tcf = q->filter_list;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment