diff options
author | Asbjørn Sloth Tønnesen <ast@fiberby.dk> | 2016-01-25 11:15:48 +0000 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-02-08 13:06:01 +0100 |
commit | 5858e2f24112059ce73a59a092afb4672ff6dfc0 (patch) | |
tree | e5f111b6b1f027be5cee1b51aaf414ef19647ab8 /tests | |
parent | d6b7dc0a98ac0b78b20c3ac18634adf3e3955707 (diff) |
tests: conntrack: add netmask tests
Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.dk>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/conntrack/testsuite/01delete | 6 | ||||
-rw-r--r-- | tests/conntrack/testsuite/02filter | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/conntrack/testsuite/01delete b/tests/conntrack/testsuite/01delete index 3c38ac5..566b89f 100644 --- a/tests/conntrack/testsuite/01delete +++ b/tests/conntrack/testsuite/01delete @@ -4,3 +4,9 @@ -D -s 2.2.2.2 -p tcp --sport 10 --dport 20 ; BAD # delete by source -D -s 1.1.1.1 ; OK +# re-create dummy +-I -s 1.1.1.1 -d 2.2.2.2 -p tcp --sport 10 --dport 20 --state LISTEN -u SEEN_REPLY -t 50 ; OK +# delete by netmask +-D -s 1.1.1.0 --mask-src 255.255.255.0 -d 2.2.2.0 --mask-dst 255.255.255.0 ; OK +# fails due to 0 matches +-D -s 1.1.1.0 --mask-src 255.255.255.0 -d 2.2.2.0 --mask-dst 255.255.255.0 ; BAD diff --git a/tests/conntrack/testsuite/02filter b/tests/conntrack/testsuite/02filter index 204c4e8..5d2270b 100644 --- a/tests/conntrack/testsuite/02filter +++ b/tests/conntrack/testsuite/02filter @@ -19,5 +19,7 @@ conntrack -L -f ipv4 ; OK # filter by mark conntrack -L --mark 0 ; OK conntrack -L --mark 0/0xffffffff; OK +# filter by netmask +conntrack -L -s 1.1.1.0 --mask-src 255.255.255.0 -d 2.0.0.0 --mask-dst 255.0.0.0 ; OK # delete dummy conntrack -D -d 2.2.2.2 ; OK |