diff options
author | Florian Westphal <fw@strlen.de> | 2017-05-25 09:14:58 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2017-05-25 09:16:38 +0200 |
commit | bb6a7f201a817652dd2c795539236c9319a23ad7 (patch) | |
tree | 1d56b003ba39a44ef0acca8f777389b7eccad394 /tests/py/ip/masquerade.t.payload | |
parent | 1e6ae0e42bdc161d178277c336886e18c259caf5 (diff) | |
parent | 5f46b18745d18c486e959c93da649c18c8b10fe0 (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/ip/masquerade.t.payload')
-rw-r--r-- | tests/py/ip/masquerade.t.payload | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/py/ip/masquerade.t.payload b/tests/py/ip/masquerade.t.payload index ad0ea518..43ac7f70 100644 --- a/tests/py/ip/masquerade.t.payload +++ b/tests/py/ip/masquerade.t.payload @@ -1,6 +1,6 @@ # udp dport 53 masquerade ip test-ip4 postrouting - [ payload load 1b @ network header + 9 => reg 1 ] + [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000011 ] [ payload load 2b @ transport header + 2 => reg 1 ] [ cmp eq reg 1 0x00003500 ] @@ -8,7 +8,7 @@ ip test-ip4 postrouting # udp dport 53 masquerade random ip test-ip4 postrouting - [ payload load 1b @ network header + 9 => reg 1 ] + [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000011 ] [ payload load 2b @ transport header + 2 => reg 1 ] [ cmp eq reg 1 0x00003500 ] @@ -16,7 +16,7 @@ ip test-ip4 postrouting # udp dport 53 masquerade random,persistent ip test-ip4 postrouting - [ payload load 1b @ network header + 9 => reg 1 ] + [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000011 ] [ payload load 2b @ transport header + 2 => reg 1 ] [ cmp eq reg 1 0x00003500 ] @@ -24,7 +24,7 @@ ip test-ip4 postrouting # udp dport 53 masquerade random,persistent,fully-random ip test-ip4 postrouting - [ payload load 1b @ network header + 9 => reg 1 ] + [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000011 ] [ payload load 2b @ transport header + 2 => reg 1 ] [ cmp eq reg 1 0x00003500 ] @@ -32,7 +32,7 @@ ip test-ip4 postrouting # udp dport 53 masquerade random,fully-random ip test-ip4 postrouting - [ payload load 1b @ network header + 9 => reg 1 ] + [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000011 ] [ payload load 2b @ transport header + 2 => reg 1 ] [ cmp eq reg 1 0x00003500 ] @@ -40,7 +40,7 @@ ip test-ip4 postrouting # udp dport 53 masquerade random,fully-random,persistent ip test-ip4 postrouting - [ payload load 1b @ network header + 9 => reg 1 ] + [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000011 ] [ payload load 2b @ transport header + 2 => reg 1 ] [ cmp eq reg 1 0x00003500 ] @@ -48,7 +48,7 @@ ip test-ip4 postrouting # udp dport 53 masquerade persistent ip test-ip4 postrouting - [ payload load 1b @ network header + 9 => reg 1 ] + [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000011 ] [ payload load 2b @ transport header + 2 => reg 1 ] [ cmp eq reg 1 0x00003500 ] @@ -56,7 +56,7 @@ ip test-ip4 postrouting # udp dport 53 masquerade persistent,random ip test-ip4 postrouting - [ payload load 1b @ network header + 9 => reg 1 ] + [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000011 ] [ payload load 2b @ transport header + 2 => reg 1 ] [ cmp eq reg 1 0x00003500 ] @@ -64,7 +64,7 @@ ip test-ip4 postrouting # udp dport 53 masquerade persistent,random,fully-random ip test-ip4 postrouting - [ payload load 1b @ network header + 9 => reg 1 ] + [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000011 ] [ payload load 2b @ transport header + 2 => reg 1 ] [ cmp eq reg 1 0x00003500 ] @@ -72,7 +72,7 @@ ip test-ip4 postrouting # udp dport 53 masquerade persistent,fully-random ip test-ip4 postrouting - [ payload load 1b @ network header + 9 => reg 1 ] + [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000011 ] [ payload load 2b @ transport header + 2 => reg 1 ] [ cmp eq reg 1 0x00003500 ] @@ -80,7 +80,7 @@ ip test-ip4 postrouting # udp dport 53 masquerade persistent,fully-random,random ip test-ip4 postrouting - [ payload load 1b @ network header + 9 => reg 1 ] + [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000011 ] [ payload load 2b @ transport header + 2 => reg 1 ] [ cmp eq reg 1 0x00003500 ] @@ -91,7 +91,7 @@ __set%d test-ip4 3 __set%d test-ip4 0 element 00000100 : 0 [end] element 00000200 : 0 [end] element 00000300 : 0 [end] element 00000400 : 0 [end] element 00000500 : 0 [end] element 00000600 : 0 [end] element 00000700 : 0 [end] element 00000800 : 0 [end] element 00006500 : 0 [end] element 0000ca00 : 0 [end] element 00002f01 : 0 [end] element 0000e903 : 0 [end] element 0000d207 : 0 [end] element 0000bb0b : 0 [end] ip test-ip4 postrouting - [ payload load 1b @ network header + 9 => reg 1 ] + [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000006 ] [ payload load 2b @ transport header + 2 => reg 1 ] [ lookup reg 1 set __set%d ] @@ -102,7 +102,7 @@ ip test-ip4 postrouting [ payload load 4b @ network header + 16 => reg 1 ] [ cmp gte reg 1 0x0000000a ] [ cmp lte reg 1 0x0403020a ] - [ payload load 1b @ network header + 9 => reg 1 ] + [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000011 ] [ payload load 2b @ transport header + 2 => reg 1 ] [ cmp eq reg 1 0x00003500 ] @@ -119,7 +119,7 @@ ip test-ip4 postrouting [ ct load state => reg 1 ] [ bitwise reg 1 = (reg=1 & 0x0000000a ) ^ 0x00000000 ] [ cmp neq reg 1 0x00000000 ] - [ payload load 1b @ network header + 9 => reg 1 ] + [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000006 ] [ payload load 2b @ transport header + 2 => reg 1 ] [ lookup reg 1 set __map%d dreg 0 ] |