summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/net/act_api.h1
-rw-r--r--net/sched/act_api.c2
-rw-r--r--net/sched/cls_api.c1
3 files changed, 3 insertions, 1 deletions
diff --git a/include/net/act_api.h b/include/net/act_api.h
index 05b568b92e59..4dabe4730f00 100644
--- a/include/net/act_api.h
+++ b/include/net/act_api.h
@@ -156,6 +156,7 @@ int tcf_idr_search(struct tc_action_net *tn, struct tc_action **a, u32 index);
int tcf_idr_create(struct tc_action_net *tn, u32 index, struct nlattr *est,
struct tc_action **a, const struct tc_action_ops *ops,
int bind, bool cpustats);
+void tcf_idr_insert_many(struct tc_action *actions[]);
void tcf_idr_cleanup(struct tc_action_net *tn, u32 index);
int tcf_idr_check_alloc(struct tc_action_net *tn, u32 *index,
struct tc_action **a, int bind);
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 1dc642b11443..43c10a85e881 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -823,7 +823,7 @@ static const struct nla_policy tcf_action_policy[TCA_ACT_MAX + 1] = {
[TCA_ACT_OPTIONS] = { .type = NLA_NESTED },
};
-static void tcf_idr_insert_many(struct tc_action *actions[])
+void tcf_idr_insert_many(struct tc_action *actions[])
{
int i;
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index d7604417367d..83e5a8aa2fb1 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -3026,6 +3026,7 @@ int tcf_exts_validate(struct net *net, struct tcf_proto *tp, struct nlattr **tb,
act->type = exts->type = TCA_OLD_COMPAT;
exts->actions[0] = act;
exts->nr_actions = 1;
+ tcf_idr_insert_many(exts->actions);
} else if (exts->action && tb[exts->action]) {
int err;