From: Pablo Neira Ayuso Date: Wed, 14 Aug 2024 11:05:54 +0000 (+0200) Subject: datatype: improve error reporting when time unit is not correct X-Git-Tag: v1.1.1~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6bcaef6a1ea6dc60250ed6124f3b49a8cd29434c;p=thirdparty%2Fnftables.git 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 --- 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; }