summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2024-08-14 13:05:54 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2024-08-19 17:24:31 +0200
commit6bcaef6a1ea6dc60250ed6124f3b49a8cd29434c (patch)
tree74006fdca11144b7d54029757bdd4fdfb42e1501 /src
parent8ed6fa6d66b2df50d118423c1cb0e98cdd45cdbd (diff)
datatype: improve error reporting when time unit is not correct
Display: Wrong unit format, expecting bytes or kbytes or mbytes instead of: Wrong rate format Fixes: 6615676d825e ("src: add per-bytes limit") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r--src/datatype.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/datatype.c b/src/datatype.c
index 297c5d04..6bbe9002 100644
--- a/src/datatype.c
+++ b/src/datatype.c
@@ -1477,7 +1477,7 @@ static struct error_record *time_unit_parse(const struct location *loc,
else if (strcmp(str, "week") == 0)
*unit = 1ULL * 60 * 60 * 24 * 7;
else
- return error(loc, "Wrong rate format");
+ return error(loc, "Wrong time format, expecting second, minute, hour, day or week");
return NULL;
}