diff options
author | Elise Lennion <elise.lennion@gmail.com> | 2017-01-26 15:21:45 -0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-01-27 13:33:20 +0100 |
commit | 7e6c6d92d2a1e770e55e8e27314f55df9b198ce9 (patch) | |
tree | ed6a59be01dd91ebd5713f2bf043a78e5debf19b /tests/py/ip/objects.t | |
parent | 153ef09be469ae9de41d912c7885f33ce47d843d (diff) |
tests: py: Add tests for stateful objects
These test for adding counters and quotas, to tables of different
families, and for referencing the objects in rules.
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/ip/objects.t')
-rw-r--r-- | tests/py/ip/objects.t | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/py/ip/objects.t b/tests/py/ip/objects.t new file mode 100644 index 00000000..8109402d --- /dev/null +++ b/tests/py/ip/objects.t @@ -0,0 +1,15 @@ +:output;type filter hook output priority 0 + +*ip;test-ip4;output + +%cnt1 type counter;ok +%cnt2 type counter;ok +%qt1 type quota 25 mbytes;ok +%qt2 type quota over 1 kbytes;ok + +ip saddr 192.168.1.3 counter name "cnt2";ok +ip saddr 192.168.1.3 counter name "cnt3";fail +counter name tcp dport map {443 : "cnt1", 80 : "cnt2", 22 : "cnt1"};ok +ip saddr 192.168.1.3 quota name "qt1";ok +ip saddr 192.168.1.3 quota name "qt3";fail +quota name tcp dport map {443 : "qt1", 80 : "qt2", 22 : "qt1"};ok |