summaryrefslogtreecommitdiffstats
path: root/net/sched/cls_api.c
diff options
context:
space:
mode:
authorRoman Mashak <mrv@mojatatu.com>2018-03-08 16:59:17 -0500
committerDavid S. Miller <davem@davemloft.net>2018-03-09 11:25:11 -0500
commitd04e6990c948a3315ea8eca5979ebea48cda56f4 (patch)
tree3b376b4e638560a98287db395dcd616ee7f3362d /net/sched/cls_api.c
parent79134e6ce2c9d1a00eab4d98cb48f975dd2474cb (diff)
downloadlinux-d04e6990c948a3315ea8eca5979ebea48cda56f4.tar.gz
linux-d04e6990c948a3315ea8eca5979ebea48cda56f4.tar.bz2
linux-d04e6990c948a3315ea8eca5979ebea48cda56f4.zip
net sched actions: update Add/Delete action API with new argument
Introduce a new function argument to carry total attributes size for correct allocation of skb in event messages. Signed-off-by: Roman Mashak <mrv@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_api.c')
-rw-r--r--net/sched/cls_api.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 19f9f421d5b7..ec5fe8ec0c3e 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -1433,6 +1433,7 @@ int tcf_exts_validate(struct net *net, struct tcf_proto *tp, struct nlattr **tb,
#ifdef CONFIG_NET_CLS_ACT
{
struct tc_action *act;
+ size_t attr_size = 0;
if (exts->police && tb[exts->police]) {
act = tcf_action_init_1(net, tp, tb[exts->police],
@@ -1450,7 +1451,7 @@ int tcf_exts_validate(struct net *net, struct tcf_proto *tp, struct nlattr **tb,
err = tcf_action_init(net, tp, tb[exts->action],
rate_tlv, NULL, ovr, TCA_ACT_BIND,
- &actions, extack);
+ &actions, &attr_size, extack);
if (err)
return err;
list_for_each_entry(act, &actions, list)