From 4ed45d7bbbb9f914c934af327ee0271bcc909302 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 13 Dec 2023 14:56:49 +0100 Subject: 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 --- src/expr/connlimit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/expr/connlimit.c') diff --git a/src/expr/connlimit.c b/src/expr/connlimit.c index 549417b..3b6c36c 100644 --- a/src/expr/connlimit.c +++ b/src/expr/connlimit.c @@ -130,7 +130,7 @@ static int nftnl_expr_connlimit_snprintf(char *buf, size_t len, struct expr_ops expr_ops_connlimit = { .name = "connlimit", .alloc_len = sizeof(struct nftnl_expr_connlimit), - .max_attr = NFTA_CONNLIMIT_MAX, + .nftnl_max_attr = __NFTNL_EXPR_CONNLIMIT_MAX - 1, .set = nftnl_expr_connlimit_set, .get = nftnl_expr_connlimit_get, .parse = nftnl_expr_connlimit_parse, -- cgit v1.2.3