aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/cls_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/cls_api.c')
-rw-r--r--net/sched/cls_api.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 0a75cb2e5e7b..70f144ac5e1d 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -31,6 +31,8 @@
31#include <net/pkt_sched.h> 31#include <net/pkt_sched.h>
32#include <net/pkt_cls.h> 32#include <net/pkt_cls.h>
33 33
34extern const struct nla_policy rtm_tca_policy[TCA_MAX + 1];
35
34/* The list of all installed classifier types */ 36/* The list of all installed classifier types */
35static LIST_HEAD(tcf_proto_base); 37static LIST_HEAD(tcf_proto_base);
36 38
@@ -1211,7 +1213,7 @@ static int tc_new_tfilter(struct sk_buff *skb, struct nlmsghdr *n,
1211replay: 1213replay:
1212 tp_created = 0; 1214 tp_created = 0;
1213 1215
1214 err = nlmsg_parse(n, sizeof(*t), tca, TCA_MAX, NULL, extack); 1216 err = nlmsg_parse(n, sizeof(*t), tca, TCA_MAX, rtm_tca_policy, extack);
1215 if (err < 0) 1217 if (err < 0)
1216 return err; 1218 return err;
1217 1219
@@ -1360,7 +1362,7 @@ static int tc_del_tfilter(struct sk_buff *skb, struct nlmsghdr *n,
1360 if (!netlink_ns_capable(skb, net->user_ns, CAP_NET_ADMIN)) 1362 if (!netlink_ns_capable(skb, net->user_ns, CAP_NET_ADMIN))
1361 return -EPERM; 1363 return -EPERM;
1362 1364
1363 err = nlmsg_parse(n, sizeof(*t), tca, TCA_MAX, NULL, extack); 1365 err = nlmsg_parse(n, sizeof(*t), tca, TCA_MAX, rtm_tca_policy, extack);
1364 if (err < 0) 1366 if (err < 0)
1365 return err; 1367 return err;
1366 1368
@@ -1475,7 +1477,7 @@ static int tc_get_tfilter(struct sk_buff *skb, struct nlmsghdr *n,
1475 void *fh = NULL; 1477 void *fh = NULL;
1476 int err; 1478 int err;
1477 1479
1478 err = nlmsg_parse(n, sizeof(*t), tca, TCA_MAX, NULL, extack); 1480 err = nlmsg_parse(n, sizeof(*t), tca, TCA_MAX, rtm_tca_policy, extack);
1479 if (err < 0) 1481 if (err < 0)
1480 return err; 1482 return err;
1481 1483
@@ -1838,7 +1840,7 @@ static int tc_ctl_chain(struct sk_buff *skb, struct nlmsghdr *n,
1838 return -EPERM; 1840 return -EPERM;
1839 1841
1840replay: 1842replay:
1841 err = nlmsg_parse(n, sizeof(*t), tca, TCA_MAX, NULL, extack); 1843 err = nlmsg_parse(n, sizeof(*t), tca, TCA_MAX, rtm_tca_policy, extack);
1842 if (err < 0) 1844 if (err < 0)
1843 return err; 1845 return err;
1844 1846
@@ -1949,7 +1951,8 @@ static int tc_dump_chain(struct sk_buff *skb, struct netlink_callback *cb)
1949 if (nlmsg_len(cb->nlh) < sizeof(*tcm)) 1951 if (nlmsg_len(cb->nlh) < sizeof(*tcm))
1950 return skb->len; 1952 return skb->len;
1951 1953
1952 err = nlmsg_parse(cb->nlh, sizeof(*tcm), tca, TCA_MAX, NULL, NULL); 1954 err = nlmsg_parse(cb->nlh, sizeof(*tcm), tca, TCA_MAX, rtm_tca_policy,
1955 NULL);
1953 if (err) 1956 if (err)
1954 return err; 1957 return err;
1955 1958