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 --- tests/shell/testcases/sets/0031set_timeout_size_0 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/shell/testcases/sets/0031set_timeout_size_0 b/tests/shell/testcases/sets/0031set_timeout_size_0 index 3d3f919a..a401ffa6 100755 --- a/tests/shell/testcases/sets/0031set_timeout_size_0 +++ b/tests/shell/testcases/sets/0031set_timeout_size_0 @@ -1,7 +1,12 @@ #!/bin/bash RULESET="add table x -add set x y { type ipv4_addr; size 128; timeout 30s; }" +add set x y { type ipv4_addr; size 128; timeout 30s; } +add chain x test +add rule x test set update ip saddr timeout 1d2h3m4s5ms @y +add rule x test set update ip daddr timeout 321ms @y" set -e $NFT -f - <<< $RULESET +$NFT list chain x test | grep -q 'update @y { ip saddr timeout 1d2h3m4s5ms }' +$NFT list chain x test | grep -q 'update @y { ip daddr timeout 321ms }' -- cgit v1.2.3