From 9ef4f9e6fe0c766395d00701131289bc2007c23c Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Wed, 9 May 2018 00:52:30 +0200 Subject: 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 --- src/expression.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/expression.c') diff --git a/src/expression.c b/src/expression.c index 239cf882..c3b6fb22 100644 --- a/src/expression.c +++ b/src/expression.c @@ -1020,11 +1020,11 @@ static void set_elem_expr_print(const struct expr *expr, expr_print(expr->key, octx); if (expr->timeout) { nft_print(octx, " timeout "); - time_print(expr->timeout / 1000, octx); + time_print(expr->timeout, octx); } if (!octx->stateless && expr->expiration) { nft_print(octx, " expires "); - time_print(expr->expiration / 1000, octx); + time_print(expr->expiration, octx); } if (expr->comment) nft_print(octx, " comment \"%s\"", expr->comment); -- cgit v1.2.3