summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorJarek Poplawski <jarkao2@gmail.com>2010-08-10 22:31:20 +0000
committerDavid S. Miller <davem@davemloft.net>2010-08-11 01:37:00 -0700
commit3e9e5a5921f4b7dc098a01d01e5972bebb36491e (patch)
treed4b50906ae56ff923e6a4ed4a20081a6da742c47 /net/sched
parent41065fba846e795b31b17e4dec01cb904d56c6cd (diff)
downloadblackbird-op-linux-3e9e5a5921f4b7dc098a01d01e5972bebb36491e.tar.gz
blackbird-op-linux-3e9e5a5921f4b7dc098a01d01e5972bebb36491e.zip
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@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/sch_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 8ed2f5649029..408eea7086aa 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))
OpenPOWER on IntegriCloud