summaryrefslogtreecommitdiffstats
path: root/tests/py/inet/dccp.t.payload.ip
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2017-05-25 09:14:58 +0200
committerFlorian Westphal <fw@strlen.de>2017-05-25 09:16:38 +0200
commitbb6a7f201a817652dd2c795539236c9319a23ad7 (patch)
tree1d56b003ba39a44ef0acca8f777389b7eccad394 /tests/py/inet/dccp.t.payload.ip
parent1e6ae0e42bdc161d178277c336886e18c259caf5 (diff)
parent5f46b18745d18c486e959c93da649c18c8b10fe0 (diff)
Merge branch 'meta_l4_dependency'
Currently nft inserts different types of dependencies for l4 protocols, depending on the family. For inet, nft inserts 'meta l4proto' to e.g. check for tcp, for ip, nft uses 'ip protocol'. Both are fine. The ip6 family however uses 'ip6 nexthdr', and thats a problem because e.g. tcp dport 22 will not match packets that use ipv6 extension headers. The series switches both ipv6 and ipv4 to use meta l4 instead so ipv6 will always check the last transport header value. We could ignore ip as only ipv6 uses extension headers. However, switching ipv4 as well makes things a bit simpler because nft then creates the same l4 dependency for all families. Acked-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/py/inet/dccp.t.payload.ip')
-rw-r--r--tests/py/inet/dccp.t.payload.ip169
1 files changed, 0 insertions, 169 deletions
diff --git a/tests/py/inet/dccp.t.payload.ip b/tests/py/inet/dccp.t.payload.ip
deleted file mode 100644
index b8844c57..00000000
--- a/tests/py/inet/dccp.t.payload.ip
+++ /dev/null
@@ -1,169 +0,0 @@
-# dccp sport 21-35
-ip test-ip4 input
- [ payload load 1b @ network header + 9 => reg 1 ]
- [ cmp eq reg 1 0x00000021 ]
- [ payload load 2b @ transport header + 0 => reg 1 ]
- [ cmp gte reg 1 0x00001500 ]
- [ cmp lte reg 1 0x00002300 ]
-
-# dccp sport != 21-35
-ip test-ip4 input
- [ payload load 1b @ network header + 9 => reg 1 ]
- [ cmp eq reg 1 0x00000021 ]
- [ payload load 2b @ transport header + 0 => reg 1 ]
- [ range neq reg 1 0x00001500 0x00002300 ]
-
-# dccp sport {23, 24, 25}
-__set%d test-ip4 3
-__set%d test-ip4 0
- element 00001700 : 0 [end] element 00001800 : 0 [end] element 00001900 : 0 [end]
-ip test-ip4 input
- [ payload load 1b @ network header + 9 => reg 1 ]
- [ cmp eq reg 1 0x00000021 ]
- [ payload load 2b @ transport header + 0 => reg 1 ]
- [ lookup reg 1 set __set%d ]
-
-# dccp sport != {23, 24, 25}
-__set%d test-ip4 3
-__set%d test-ip4 0
- element 00001700 : 0 [end] element 00001800 : 0 [end] element 00001900 : 0 [end]
-ip test-ip4 input
- [ payload load 1b @ network header + 9 => reg 1 ]
- [ cmp eq reg 1 0x00000021 ]
- [ payload load 2b @ transport header + 0 => reg 1 ]
- [ lookup reg 1 set __set%d 0x1 ]
-
-# dccp sport { 20-50 }
-__set%d test-ip4 7
-__set%d test-ip4 0
- element 00000000 : 1 [end] element 00001400 : 0 [end] element 00003300 : 1 [end]
-ip test-ip4 input
- [ payload load 1b @ network header + 9 => reg 1 ]
- [ cmp eq reg 1 0x00000021 ]
- [ payload load 2b @ transport header + 0 => reg 1 ]
- [ lookup reg 1 set __set%d ]
-
-# dccp sport != { 20-50 }
-__set%d test-ip4 7
-__set%d test-ip4 0
- element 00000000 : 1 [end] element 00001400 : 0 [end] element 00003300 : 1 [end]
-ip test-ip4 input
- [ payload load 1b @ network header + 9 => reg 1 ]
- [ cmp eq reg 1 0x00000021 ]
- [ payload load 2b @ transport header + 0 => reg 1 ]
- [ lookup reg 1 set __set%d 0x1 ]
-
-# dccp sport ftp-data - re-mail-ck
-ip test-ip4 input
- [ payload load 1b @ network header + 9 => reg 1 ]
- [ cmp eq reg 1 0x00000021 ]
- [ payload load 2b @ transport header + 0 => reg 1 ]
- [ cmp gte reg 1 0x00001400 ]
- [ cmp lte reg 1 0x00003200 ]
-
-# dccp sport 20-50
-ip test-ip4 input
- [ payload load 1b @ network header + 9 => reg 1 ]
- [ cmp eq reg 1 0x00000021 ]
- [ payload load 2b @ transport header + 0 => reg 1 ]
- [ cmp gte reg 1 0x00001400 ]
- [ cmp lte reg 1 0x00003200 ]
-
-# dccp sport { 20-50}
-__set%d test-ip4 7
-__set%d test-ip4 0
- element 00000000 : 1 [end] element 00001400 : 0 [end] element 00003300 : 1 [end]
-ip test-ip4 input
- [ payload load 1b @ network header + 9 => reg 1 ]
- [ cmp eq reg 1 0x00000021 ]
- [ payload load 2b @ transport header + 0 => reg 1 ]
- [ lookup reg 1 set __set%d ]
-
-# dccp sport != { 20-50}
-__set%d test-ip4 7
-__set%d test-ip4 0
- element 00000000 : 1 [end] element 00001400 : 0 [end] element 00003300 : 1 [end]
-ip test-ip4 input
- [ payload load 1b @ network header + 9 => reg 1 ]
- [ cmp eq reg 1 0x00000021 ]
- [ payload load 2b @ transport header + 0 => reg 1 ]
- [ lookup reg 1 set __set%d 0x1 ]
-
-# dccp dport {23, 24, 25}
-__set%d test-ip4 3
-__set%d test-ip4 0
- element 00001700 : 0 [end] element 00001800 : 0 [end] element 00001900 : 0 [end]
-ip test-ip4 input
- [ payload load 1b @ network header + 9 => reg 1 ]
- [ cmp eq reg 1 0x00000021 ]
- [ payload load 2b @ transport header + 2 => reg 1 ]
- [ lookup reg 1 set __set%d ]
-
-# dccp dport != {23, 24, 25}
-__set%d test-ip4 3
-__set%d test-ip4 0
- element 00001700 : 0 [end] element 00001800 : 0 [end] element 00001900 : 0 [end]
-ip test-ip4 input
- [ payload load 1b @ network header + 9 => reg 1 ]
- [ cmp eq reg 1 0x00000021 ]
- [ payload load 2b @ transport header + 2 => reg 1 ]
- [ lookup reg 1 set __set%d 0x1 ]
-
-# dccp dport { 20-50}
-__set%d test-ip4 7
-__set%d test-ip4 0
- element 00000000 : 1 [end] element 00001400 : 0 [end] element 00003300 : 1 [end]
-ip test-ip4 input
- [ payload load 1b @ network header + 9 => reg 1 ]
- [ cmp eq reg 1 0x00000021 ]
- [ payload load 2b @ transport header + 2 => reg 1 ]
- [ lookup reg 1 set __set%d ]
-
-# dccp dport != { 20-50}
-__set%d test-ip4 7
-__set%d test-ip4 0
- element 00000000 : 1 [end] element 00001400 : 0 [end] element 00003300 : 1 [end]
-ip test-ip4 input
- [ payload load 1b @ network header + 9 => reg 1 ]
- [ cmp eq reg 1 0x00000021 ]
- [ payload load 2b @ transport header + 2 => reg 1 ]
- [ lookup reg 1 set __set%d 0x1 ]
-
-# dccp type {request, response, data, ack, dataack, closereq, close, reset, sync, syncack}
-__set%d test-ip4 3
-__set%d test-ip4 0
- element 00000000 : 0 [end] element 00000002 : 0 [end] element 00000004 : 0 [end] element 00000006 : 0 [end] element 00000008 : 0 [end] element 0000000a : 0 [end] element 0000000c : 0 [end] element 0000000e : 0 [end] element 00000010 : 0 [end] element 00000012 : 0 [end]
-ip test-ip4 input
- [ payload load 1b @ network header + 9 => reg 1 ]
- [ cmp eq reg 1 0x00000021 ]
- [ payload load 1b @ transport header + 8 => reg 1 ]
- [ bitwise reg 1 = (reg=1 & 0x0000001e ) ^ 0x00000000 ]
- [ lookup reg 1 set __set%d ]
-
-# dccp type != {request, response, data, ack, dataack, closereq, close, reset, sync, syncack}
-__set%d test-ip4 3
-__set%d test-ip4 0
- element 00000000 : 0 [end] element 00000002 : 0 [end] element 00000004 : 0 [end] element 00000006 : 0 [end] element 00000008 : 0 [end] element 0000000a : 0 [end] element 0000000c : 0 [end] element 0000000e : 0 [end] element 00000010 : 0 [end] element 00000012 : 0 [end]
-ip test-ip4 input
- [ payload load 1b @ network header + 9 => reg 1 ]
- [ cmp eq reg 1 0x00000021 ]
- [ payload load 1b @ transport header + 8 => reg 1 ]
- [ bitwise reg 1 = (reg=1 & 0x0000001e ) ^ 0x00000000 ]
- [ lookup reg 1 set __set%d 0x1 ]
-
-# dccp type request
-ip test-ip4 input
- [ payload load 1b @ network header + 9 => reg 1 ]
- [ cmp eq reg 1 0x00000021 ]
- [ payload load 1b @ transport header + 8 => reg 1 ]
- [ bitwise reg 1 = (reg=1 & 0x0000001e ) ^ 0x00000000 ]
- [ cmp eq reg 1 0x00000000 ]
-
-# dccp type != request
-ip test-ip4 input
- [ payload load 1b @ network header + 9 => reg 1 ]
- [ cmp eq reg 1 0x00000021 ]
- [ payload load 1b @ transport header + 8 => reg 1 ]
- [ bitwise reg 1 = (reg=1 & 0x0000001e ) ^ 0x00000000 ]
- [ cmp neq reg 1 0x00000000 ]
-