From: Fabian Frederick Date: Thu, 24 Sep 2020 10:17:33 +0000 (+0200) Subject: selftests: netfilter: add time counter check X-Git-Tag: v5.10-rc1~107^2~1^2~29^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=48d072c4e8cdb542ade06727c31d7851bcc40a89;p=thirdparty%2Fkernel%2Flinux.git selftests: netfilter: add time counter check Check packets are correctly placed in current year. Also do a NULL check for another one. Signed-off-by: Fabian Frederick Signed-off-by: Pablo Neira Ayuso --- diff --git a/tools/testing/selftests/netfilter/nft_meta.sh b/tools/testing/selftests/netfilter/nft_meta.sh index 18a1abca32629..087f0e6e71ce7 100755 --- a/tools/testing/selftests/netfilter/nft_meta.sh +++ b/tools/testing/selftests/netfilter/nft_meta.sh @@ -23,6 +23,8 @@ ip -net "$ns0" addr add 127.0.0.1 dev lo trap cleanup EXIT +currentyear=$(date +%G) +lastyear=$((currentyear-1)) ip netns exec "$ns0" nft -f /dev/stdin <