[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1389883519.4703.5.camel@azathoth.dev.smoothwall.net>
Date: Thu, 16 Jan 2014 14:45:19 +0000
From: Harry Mason <harry.mason@...othwall.net>
To: Jamal Hadi Salim <hadi@...atatu.com>
Cc: linux-netdev <netdev@...r.kernel.org>
Subject: [PATCH] sch_htb: let skb->priority refer to non-leaf class
If the class in skb->priority is not a leaf, apply filters from the
selected class, not the qdisc. This allows netfilter or user space
to partially classify the packet and tc filters to finish it off.
Signed-off-by: Harry Mason <harry.mason@...othwall.net>
---
net/sched/sch_htb.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 717b210..e50ab65 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -223,7 +223,13 @@ static struct htb_class *htb_classify(struct
sk_buff *skb, struct Qdisc *sch,
return cl;
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
- tcf = q->filter_list;
+
+ /* Start with inner filter chain if a non-leaf class is selected */
+ if (cl)
+ tcf = cl->filter_list;
+ else
+ tcf = q->filter_list;
+
while (tcf && (result = tc_classify(skb, tcf, &res)) >= 0) {
#ifdef CONFIG_NET_CLS_ACT
switch (result) {
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists