]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/sched/cls_basic.c
net_sched: fix ops->bind_class() implementations
[mirror_ubuntu-bionic-kernel.git] / net / sched / cls_basic.c
index 9afb739329830c7b970ecb51a95c42b7483be18a..2e51d1169eff73aea6811566ad7a98f63416b5c1 100644 (file)
@@ -255,12 +255,17 @@ skip:
        }
 }
 
-static void basic_bind_class(void *fh, u32 classid, unsigned long cl)
+static void basic_bind_class(void *fh, u32 classid, unsigned long cl, void *q,
+                            unsigned long base)
 {
        struct basic_filter *f = fh;
 
-       if (f && f->res.classid == classid)
-               f->res.class = cl;
+       if (f && f->res.classid == classid) {
+               if (cl)
+                       __tcf_bind_filter(q, &f->res, base);
+               else
+                       __tcf_unbind_filter(q, &f->res);
+       }
 }
 
 static int basic_dump(struct net *net, struct tcf_proto *tp, void *fh,