diff --git a/include/net/act_api.h b/include/net/act_api.h index 87214927314a1ed2f084b43b4e227263f2079225..414c1de11f397e76c3aae9df7b1ba4c33ae4e09f 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h @@ -166,6 +166,7 @@ int tcf_idr_create_from_flags(struct tc_action_net *tn, u32 index, struct nlattr *est, struct tc_action **a, const struct tc_action_ops *ops, int bind, u32 flags); +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 f66417d5d2c3130e570f71276ba1b972110d9e10..960af164d0e15f1b6fa0bea95e56da43e2d8b666 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -888,7 +888,7 @@ static const struct nla_policy tcf_action_policy[TCA_ACT_MAX + 1] = { [TCA_ACT_HW_STATS] = NLA_POLICY_BITFIELD32(TCA_ACT_HW_STATS_ANY), }; -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 838b3fd94d77683cf3164734300cf5d7b5631c47..babb5f2f1a893466039bf74cf7b9e1070b4efcbc 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -3065,6 +3065,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;