[PATCH] acl: fix the value of the trans table
Huichao Cai
chcchc88 at 163.com
Fri Jul 25 12:21:51 CEST 2025
The node_array[RTE_ACL_DFA_SIZE] is assigned to
RTE_ACL_IDLE_NODE and is used as a node of
RTE_ACL_NODE_SINGLE type, but it is currently based
on the implementation of idle arrays with a value of all
0 to point to itself, which is unsafe, if the value of the
idle array is not 0, it will produce undefined behavior,
so it needs to be given node_array[RTE_ACL_DFA_ SIZE]
plus RTE_ACL_QUAD_SINGLE.
Signed-off-by: Huichao Cai <chcchc88 at 163.com>
---
lib/acl/acl_gen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/acl/acl_gen.c b/lib/acl/acl_gen.c
index 3c53d24056..95c7888162 100644
--- a/lib/acl/acl_gen.c
+++ b/lib/acl/acl_gen.c
@@ -497,7 +497,7 @@ rte_acl_gen(struct rte_acl_ctx *ctx, struct rte_acl_trie *trie,
* highest index, that points to itself)
*/
- node_array[RTE_ACL_DFA_SIZE] = RTE_ACL_IDLE_NODE;
+ node_array[RTE_ACL_DFA_SIZE] = RTE_ACL_QUAD_SINGLE | RTE_ACL_IDLE_NODE;
for (n = 0; n < RTE_ACL_DFA_SIZE; n++)
node_array[n] = no_match;
--
2.27.0
More information about the dev
mailing list