Skip to contentSkip to conversation

TBF: do not oops when user tries to attach/show filter

PATCH In review Dmitry Torokhov 2 participants 2 messages May 26, 2004

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 TBF: do not oops when user tries to attach/show filter

===================================================================

[email protected], 2004-05-25 23:05:29-05:00, [email protected]
[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)

 sch_tbf.c |    6 ++++++
 1 files changed, 6 insertions(+)

===================================================================

net/sched/sch_tbf.c +6 -0
diff -Nru a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c
@@ -503,6 +503,11 @@
 	}
 }
 
+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,
@@ -512,6 +517,7 @@
 	.change		=	tbf_change_class,
 	.delete		=	tbf_delete,
 	.walk		=	tbf_walk,
+	.tcf_chain	=	tbf_find_tcf,
 	.dump		=	tbf_dump_class,
 };