summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-05-09 00:52:30 +0200
committerFlorian Westphal <fw@strlen.de>2018-05-09 09:21:07 +0200
commit9ef4f9e6fe0c766395d00701131289bc2007c23c (patch)
treeb31dd884a3bc14cb32112ee4b7e3873cbe9c9e42 /src/rule.c
parent1eadd73e30deab778ddfc26e9222a4d23bedb140 (diff)
src: support timeouts in milliseconds
currently the frontend uses seconds everywhere and multiplies/divides by 1000. Pass milliseconds around instead and extend the scanner to accept 'ms' in timestrings. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rule.c b/src/rule.c
index 2f0123b7..bdfc10f3 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -379,12 +379,12 @@ static void set_print_declaration(const struct set *set,
if (set->timeout) {
nft_print(octx, "%s%stimeout ", opts->tab, opts->tab);
- time_print(set->timeout / 1000, octx);
+ time_print(set->timeout, octx);
nft_print(octx, "%s", opts->stmt_separator);
}
if (set->gc_int) {
nft_print(octx, "%s%sgc-interval ", opts->tab, opts->tab);
- time_print(set->gc_int / 1000, octx);
+ time_print(set->gc_int, octx);
nft_print(octx, "%s", opts->stmt_separator);
}
}