[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20100811083120.GB10126@ff.dom.local>
Date: Wed, 11 Aug 2010 08:31:20 +0000
From: Jarek Poplawski <jarkao2@...il.com>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org, Stephen Hemminger <shemminger@...tta.com>,
Patrick McHardy <kaber@...sh.net>,
Franchoze Eric <franchoze@...dex.ru>
Subject: [PATCH 2/2] pkt_sched: Check .walk and .leaf class handlers
Require qdisc class ops .walk and .leaf for classful qdisc in
register_qdisc(). The checks could be done later insted, but these
ops are really needed and used by most of classful qdiscs.
Signed-off-by: Jarek Poplawski <jarkao2@...il.com>
---
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 8ed2f56..408eea7 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -161,7 +161,7 @@ int register_qdisc(struct Qdisc_ops *qops)
if (qops->cl_ops) {
const struct Qdisc_class_ops *cops = qops->cl_ops;
- if (!(cops->get && cops->put))
+ if (!(cops->get && cops->put && cops->walk && cops->leaf))
goto out_einval;
if (cops->tcf_chain && !(cops->bind_tcf && cops->unbind_tcf))
--
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