]> git.neil.brown.name Git - history.git/commitdiff
[NET_SCHED] Do not oops when user tries to attach a filter to a TBF qdisc.
authorDmitry Torokhov <dtor_core@ameritech.net>
Tue, 25 May 2004 16:13:48 +0000 (09:13 -0700)
committerDmitry Torokhov <dtor_core@ameritech.net>
Tue, 25 May 2004 16:13:48 +0000 (09:13 -0700)
(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

index 7eadd1910ce4168db68a663ae63b002d40a7c2df..7854980566f514f08b57be9c3066ebfb69839993 100644 (file)
@@ -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,
 };