summaryrefslogtreecommitdiffstats
path: root/tests/nfct/test-live.sh
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2015-08-21 19:18:38 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2015-08-26 20:43:55 +0200
commitdd73ceecdbe87b6ecf9e96643cd5326e520d7a1c (patch)
treec4c3a7b933dde6bd9094abad606a9435256e383d /tests/nfct/test-live.sh
parent1c36d487cda8d1bed799b4daa28c44aa7198bb31 (diff)
nfct: Update syntax to specify command before subsystem
This patch gets the nfct syntax in sync with nft so it looks like this: nfct <add|delete|...> object ... instead of: nfct object <add|delete|...> ... This patch retains backward compatibility so you can still use the old syntax. The manpage and tests have been also updated to promote the adoption of this syntax. We should have little existing clients of this tool as we can only use this to configure the cttimeout and cthelper infrastructures. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/nfct/test-live.sh')
-rw-r--r--tests/nfct/test-live.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/nfct/test-live.sh b/tests/nfct/test-live.sh
index c338e63..2257087 100644
--- a/tests/nfct/test-live.sh
+++ b/tests/nfct/test-live.sh
@@ -6,7 +6,7 @@
WAIT_BETWEEN_TESTS=10
# flush cttimeout table
-nfct timeout flush
+nfct flush timeout
# flush the conntrack table
conntrack -F
@@ -19,7 +19,7 @@ echo "---- test no. 1 ----"
conntrack -E -p 13 &
-nfct timeout add test-generic inet generic timeout 100
+nfct add timeout test-generic inet generic timeout 100
iptables -I OUTPUT -t raw -p all -j CT --timeout test-generic
hping3 -c 1 -V -I eth0 -0 8.8.8.8 -H 13
@@ -30,7 +30,7 @@ echo "---- end test no. 1 ----"
sleep $WAIT_BETWEEN_TESTS
iptables -D OUTPUT -t raw -p all -j CT --timeout test-generic
-nfct timeout del test-generic
+nfct del timeout test-generic
#
# No.2: test TCP timeout policy
@@ -40,14 +40,14 @@ echo "---- test no. 2 ----"
conntrack -E -p tcp &
-nfct timeout add test-tcp inet tcp syn_sent 100
+nfct add timeout test-tcp inet tcp syn_sent 100
iptables -I OUTPUT -t raw -p tcp -j CT --timeout test-tcp
hping3 -V -S -p 80 -s 5050 8.8.8.8 -c 1
sleep $WAIT_BETWEEN_TESTS
iptables -D OUTPUT -t raw -p tcp -j CT --timeout test-tcp
-nfct timeout del test-tcp
+nfct del timeout test-tcp
killall -15 conntrack
@@ -61,12 +61,12 @@ echo "---- test no. 3 ----"
conntrack -E -p icmp &
-nfct timeout add test-icmp inet icmp timeout 50
+nfct add timeout test-icmp inet icmp timeout 50
iptables -I OUTPUT -t raw -p icmp -j CT --timeout test-icmp
hping3 -1 8.8.8.8 -c 2
iptables -D OUTPUT -t raw -p icmp -j CT --timeout test-icmp
-nfct timeout del test-icmp
+nfct del timeout test-icmp
killall -15 conntrack