summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/expr/limit.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/expr/limit.c b/src/expr/limit.c
index f2f7703..3a0d5a0 100644
--- a/src/expr/limit.c
+++ b/src/expr/limit.c
@@ -55,15 +55,17 @@ nft_rule_expr_limit_get(const struct nft_rule_expr *e, uint16_t type,
switch(type) {
case NFT_EXPR_LIMIT_RATE:
- if (e->flags & (1 << NFT_EXPR_LIMIT_RATE))
+ if (e->flags & (1 << NFT_EXPR_LIMIT_RATE)) {
+ *data_len = sizeof(uint64_t);
return &limit->rate;
- else
+ } else
return NULL;
break;
case NFT_EXPR_LIMIT_DEPTH:
- if (e->flags & (1 << NFT_EXPR_LIMIT_DEPTH))
+ if (e->flags & (1 << NFT_EXPR_LIMIT_DEPTH)) {
+ *data_len = sizeof(uint64_t);
return &limit->depth;
- else
+ } else
return NULL;
break;
default: