net: sched: cls: add extack support for tcf_change_indev
[linux-2.6-block.git] / net / sched / cls_fw.c
index 20f0de1a960a7b993596355acc35bf15a7dd02bd..94d159a8869ac952cedba68c4685496c6dacd8e2 100644 (file)
@@ -172,7 +172,8 @@ static void fw_destroy(struct tcf_proto *tp)
        kfree_rcu(head, rcu);
 }
 
-static int fw_delete(struct tcf_proto *tp, void *arg, bool *last)
+static int fw_delete(struct tcf_proto *tp, void *arg, bool *last,
+                    struct netlink_ext_ack *extack)
 {
        struct fw_head *head = rtnl_dereference(tp->root);
        struct fw_filter *f = arg;
@@ -218,13 +219,15 @@ static const struct nla_policy fw_policy[TCA_FW_MAX + 1] = {
 
 static int fw_set_parms(struct net *net, struct tcf_proto *tp,
                        struct fw_filter *f, struct nlattr **tb,
-                       struct nlattr **tca, unsigned long base, bool ovr)
+                       struct nlattr **tca, unsigned long base, bool ovr,
+                       struct netlink_ext_ack *extack)
 {
        struct fw_head *head = rtnl_dereference(tp->root);
        u32 mask;
        int err;
 
-       err = tcf_exts_validate(net, tp, tb, tca[TCA_RATE], &f->exts, ovr);
+       err = tcf_exts_validate(net, tp, tb, tca[TCA_RATE], &f->exts, ovr,
+                               extack);
        if (err < 0)
                return err;
 
@@ -236,7 +239,7 @@ static int fw_set_parms(struct net *net, struct tcf_proto *tp,
 #ifdef CONFIG_NET_CLS_IND
        if (tb[TCA_FW_INDEV]) {
                int ret;
-               ret = tcf_change_indev(net, tb[TCA_FW_INDEV]);
+               ret = tcf_change_indev(net, tb[TCA_FW_INDEV], extack);
                if (ret < 0)
                        return ret;
                f->ifindex = ret;
@@ -257,7 +260,7 @@ static int fw_set_parms(struct net *net, struct tcf_proto *tp,
 static int fw_change(struct net *net, struct sk_buff *in_skb,
                     struct tcf_proto *tp, unsigned long base,
                     u32 handle, struct nlattr **tca, void **arg,
-                    bool ovr)
+                    bool ovr, struct netlink_ext_ack *extack)
 {
        struct fw_head *head = rtnl_dereference(tp->root);
        struct fw_filter *f = *arg;
@@ -296,7 +299,7 @@ static int fw_change(struct net *net, struct sk_buff *in_skb,
                        return err;
                }
 
-               err = fw_set_parms(net, tp, fnew, tb, tca, base, ovr);
+               err = fw_set_parms(net, tp, fnew, tb, tca, base, ovr, extack);
                if (err < 0) {
                        tcf_exts_destroy(&fnew->exts);
                        kfree(fnew);
@@ -345,7 +348,7 @@ static int fw_change(struct net *net, struct sk_buff *in_skb,
        f->id = handle;
        f->tp = tp;
 
-       err = fw_set_parms(net, tp, f, tb, tca, base, ovr);
+       err = fw_set_parms(net, tp, f, tb, tca, base, ovr, extack);
        if (err < 0)
                goto errout;