aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/cls_bpf.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/cls_bpf.c')
-rw-r--r--net/sched/cls_bpf.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c
index 6f2dffe30f25..520c5027646a 100644
--- a/net/sched/cls_bpf.c
+++ b/net/sched/cls_bpf.c
@@ -607,6 +607,14 @@ nla_put_failure:
607 return -1; 607 return -1;
608} 608}
609 609
610static void cls_bpf_bind_class(void *fh, u32 classid, unsigned long cl)
611{
612 struct cls_bpf_prog *prog = fh;
613
614 if (prog && prog->res.classid == classid)
615 prog->res.class = cl;
616}
617
610static void cls_bpf_walk(struct tcf_proto *tp, struct tcf_walker *arg) 618static void cls_bpf_walk(struct tcf_proto *tp, struct tcf_walker *arg)
611{ 619{
612 struct cls_bpf_head *head = rtnl_dereference(tp->root); 620 struct cls_bpf_head *head = rtnl_dereference(tp->root);
@@ -635,6 +643,7 @@ static struct tcf_proto_ops cls_bpf_ops __read_mostly = {
635 .delete = cls_bpf_delete, 643 .delete = cls_bpf_delete,
636 .walk = cls_bpf_walk, 644 .walk = cls_bpf_walk,
637 .dump = cls_bpf_dump, 645 .dump = cls_bpf_dump,
646 .bind_class = cls_bpf_bind_class,
638}; 647};
639 648
640static int __init cls_bpf_init_mod(void) 649static int __init cls_bpf_init_mod(void)