From fb8c2688d91d47747f1ef593baf3cd377046216d Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Tue, 25 May 2004 09:13:48 -0700 Subject: [PATCH] [NET_SCHED] Do not oops when user tries to attach a filter to a TBF qdisc. (TBF does not allow attaching filters as it has only one class, filter should be attached either to TBF's parent or to its child) --- net/sched/sch_tbf.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c index 7eadd1910ce41..7854980566f51 100644 --- a/net/sched/sch_tbf.c +++ b/net/sched/sch_tbf.c @@ -495,6 +495,11 @@ static void tbf_walk(struct Qdisc *sch, struct qdisc_walker *walker) } } +static struct tcf_proto **tbf_find_tcf(struct Qdisc *sch, unsigned long cl) +{ + return NULL; +} + static struct Qdisc_class_ops tbf_class_ops = { .graft = tbf_graft, @@ -504,6 +509,7 @@ static struct Qdisc_class_ops tbf_class_ops = .change = tbf_change_class, .delete = tbf_delete, .walk = tbf_walk, + .tcf_chain = tbf_find_tcf, .dump = tbf_dump_class, }; -- 2.53.0