[nft PATCH 01/26] tests: py: Test connlimit statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This wasn't covered at all.

Signed-off-by: Phil Sutter <phil@xxxxxx>
---
 tests/py/any/ct.t         |  3 +++
 tests/py/any/ct.t.json    | 19 +++++++++++++++++++
 tests/py/any/ct.t.payload |  8 ++++++++
 3 files changed, 30 insertions(+)

diff --git a/tests/py/any/ct.t b/tests/py/any/ct.t
index 8b8e68ab7361a..f73fa4e7aedbe 100644
--- a/tests/py/any/ct.t
+++ b/tests/py/any/ct.t
@@ -144,3 +144,6 @@ ct set invalid original 42;fail
 ct set invalid 42;fail
 
 notrack;ok
+
+ct count 3;ok
+ct count over 3;ok
diff --git a/tests/py/any/ct.t.json b/tests/py/any/ct.t.json
index 6684963b6609c..a2a06025992c7 100644
--- a/tests/py/any/ct.t.json
+++ b/tests/py/any/ct.t.json
@@ -1502,3 +1502,22 @@
     }
 ]
 
+# ct count 3
+[
+    {
+        "ct count": {
+            "val": 3
+        }
+    }
+]
+
+# ct count over 3
+[
+    {
+        "ct count": {
+            "inv": true,
+            "val": 3
+        }
+    }
+]
+
diff --git a/tests/py/any/ct.t.payload b/tests/py/any/ct.t.payload
index 733276e196f20..ed868e53277d9 100644
--- a/tests/py/any/ct.t.payload
+++ b/tests/py/any/ct.t.payload
@@ -508,3 +508,11 @@ ip6
   [ bitwise reg 1 = ( reg 1 & 0x00000020 ) ^ 0x00000000 ]
   [ cmp eq reg 1 0x00000000 ]
 
+# ct count 3
+ip test-ip4 output
+  [ connlimit count 3 flags 0 ]
+
+# ct count over 3
+ip test-ip4 output
+  [ connlimit count 3 flags 1 ]
+
-- 
2.34.1




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux