Add tests for listing ct timeout objects and input from file.
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
l3proto ip
}
+ ct timeout cttime {
+ protocol udp;
+ l3proto ip
+ policy = {unreplied: 15, replied: 12}
+ }
+
chain input {
}
}"
$NFT add chain test input
$NFT add quota test https-quota 25 mbytes
$NFT add ct helper test cthelp { type \"sip\" protocol tcp \; }
+$NFT add ct timeout test cttime { protocol udp \; policy = {replied: 12, unreplied: 15 } \; }
$NFT add table test-ip
GET="$($NFT list table test)"
--- /dev/null
+#!/bin/bash
+
+EXPECTED='table ip filter {
+ ct timeout cttime{
+ protocol tcp;
+ l3proto ip
+ policy = {established: 123, close: 12}
+ }
+
+ chain c {
+ ct timeout set "cttime"
+ }
+}'
+
+set -e
+$NFT -f - <<< $EXPECTED