diff options
author | Roman Mashak <mrv@mojatatu.com> | 2018-03-08 16:59:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-09 11:25:11 -0500 |
commit | d04e6990c948a3315ea8eca5979ebea48cda56f4 (patch) | |
tree | 3b376b4e638560a98287db395dcd616ee7f3362d /net/sched/cls_api.c | |
parent | 79134e6ce2c9d1a00eab4d98cb48f975dd2474cb (diff) |
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.c | 3 |
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, | |||
1433 | #ifdef CONFIG_NET_CLS_ACT | 1433 | #ifdef CONFIG_NET_CLS_ACT |
1434 | { | 1434 | { |
1435 | struct tc_action *act; | 1435 | struct tc_action *act; |
1436 | size_t attr_size = 0; | ||
1436 | 1437 | ||
1437 | if (exts->police && tb[exts->police]) { | 1438 | if (exts->police && tb[exts->police]) { |
1438 | act = tcf_action_init_1(net, tp, tb[exts->police], | 1439 | 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, | |||
1450 | 1451 | ||
1451 | err = tcf_action_init(net, tp, tb[exts->action], | 1452 | err = tcf_action_init(net, tp, tb[exts->action], |
1452 | rate_tlv, NULL, ovr, TCA_ACT_BIND, | 1453 | rate_tlv, NULL, ovr, TCA_ACT_BIND, |
1453 | &actions, extack); | 1454 | &actions, &attr_size, extack); |
1454 | if (err) | 1455 | if (err) |
1455 | return err; | 1456 | return err; |
1456 | list_for_each_entry(act, &actions, list) | 1457 | list_for_each_entry(act, &actions, list) |