]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/sched/cls_route.c
net_sched: fix ops->bind_class() implementations
[mirror_ubuntu-bionic-kernel.git] / net / sched / cls_route.c
index 9b1eecd1137aed1ef5260fbad947197d1aead8f3..19ebe42f9981e35b31f0af2bdc5435e1c2aa695f 100644 (file)
@@ -643,12 +643,17 @@ nla_put_failure:
        return -1;
 }
 
-static void route4_bind_class(void *fh, u32 classid, unsigned long cl)
+static void route4_bind_class(void *fh, u32 classid, unsigned long cl, void *q,
+                             unsigned long base)
 {
        struct route4_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 struct tcf_proto_ops cls_route4_ops __read_mostly = {