net/sched: act_api: avoid non-contiguous action array
authorPedro Tammela <pctammela@mojatatu.com>
Fri, 1 Dec 2023 17:50:13 +0000 (14:50 -0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 5 Dec 2023 10:15:08 +0000 (11:15 +0100)
commita0e947c9ccffe47d45aca793d9e7fe4f4494e381
tree2a5d782e7e335376c52e696cd145314ae87903f0
parent3872347e0a16876279bb21642e03842f283f0e38
net/sched: act_api: avoid non-contiguous action array

In tcf_action_add, when putting the reference for the bound actions
it assigns NULLs to just created actions passing a non contiguous
array to tcf_action_put_many.
Refactor the code so the actions array is always contiguous.

Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/sched/act_api.c