From 757b3ab08b8b22f230fb8e481bec78ecbfbb335a Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Thu, 7 Jan 2016 13:23:33 +0100 Subject: nft: swap key and direction in ct_dir syntax old: ct saddr original 1.2.3.4 new: ct original saddr 1.2.3.4 The advantage is that this allows to add ct keys where direction is optional without creating ambiguities in the parser. So we can have ct packets gt 42 ct original packets gt 42 Signed-off-by: Florian Westphal Acked-by: Pablo Neira Ayuso --- tests/py/any/ct.t | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/py/any/ct.t') diff --git a/tests/py/any/ct.t b/tests/py/any/ct.t index 9434dc63..fd27a1da 100644 --- a/tests/py/any/ct.t +++ b/tests/py/any/ct.t @@ -109,3 +109,11 @@ ct state . ct mark { new . 0x12345678};ok ct state . ct mark { new . 0x12345678, new . 0x34127856, established . 0x12785634};ok ct direction . ct mark { original . 0x12345678};ok ct state . ct mark vmap { new . 0x12345678 : drop};ok + +# missing direction +ct saddr 1.2.3.4;fail + +# direction, but must be used without +ct original mark 42;fail +# swapped key and direction +ct mark original;fail -- cgit v1.2.3