summaryrefslogtreecommitdiffstats
path: root/src/expr/dynset.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2023-12-13 14:56:49 +0100
committerPhil Sutter <phil@nwl.cc>2024-03-06 15:40:37 +0100
commit4ed45d7bbbb9f914c934af327ee0271bcc909302 (patch)
treef99332e063ae4aee3cc16cd53afc8e9812b88cec /src/expr/dynset.c
parentc2982f81e0d15fb3109112945c73b93a53e21348 (diff)
expr: Repurpose struct expr_ops::max_attr field
Instead of holding the maximum kernel space (NFTA_*) attribute value, use it to hold the maximum expression attribute (NFTNL_EXPR_*) value instead. This will be used for index boundary checks in an attribute policy array later. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'src/expr/dynset.c')
-rw-r--r--src/expr/dynset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/expr/dynset.c b/src/expr/dynset.c
index 5bcf1c6..ee6ce1e 100644
--- a/src/expr/dynset.c
+++ b/src/expr/dynset.c
@@ -366,7 +366,7 @@ static void nftnl_expr_dynset_free(const struct nftnl_expr *e)
struct expr_ops expr_ops_dynset = {
.name = "dynset",
.alloc_len = sizeof(struct nftnl_expr_dynset),
- .max_attr = NFTA_DYNSET_MAX,
+ .nftnl_max_attr = __NFTNL_EXPR_DYNSET_MAX - 1,
.init = nftnl_expr_dynset_init,
.free = nftnl_expr_dynset_free,
.set = nftnl_expr_dynset_set,