diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-09-03 18:23:18 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-09-11 20:05:47 +0200 |
commit | b716c2b48a77fd0c01be128d704d9cd2cd5243b3 (patch) | |
tree | 04d72a0577d2fa793ecddf34db362c290bdb0e25 /tests/regression/ip/dnat.t.payload.ip | |
parent | 4bfcee9847fa4d45685638cb505782bcd6ee2853 (diff) |
tests: add concatenations and maps; combine them too
This patch adds simple tests for concatenation and maps, including more
advanced tests that combine them.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/regression/ip/dnat.t.payload.ip')
-rw-r--r-- | tests/regression/ip/dnat.t.payload.ip | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/regression/ip/dnat.t.payload.ip b/tests/regression/ip/dnat.t.payload.ip index 93c4d68b..026e8719 100644 --- a/tests/regression/ip/dnat.t.payload.ip +++ b/tests/regression/ip/dnat.t.payload.ip @@ -48,3 +48,22 @@ ip test-ip4 prerouting [ immediate reg 1 0x0203a8c0 ] [ nat dnat ip addr_min reg 1 addr_max reg 0 ] +# dnat ct mark map { 0x00000014 : 1.2.3.4} +map%d test-ip4 b +map%d test-ip4 0 + element 00000014 : 04030201 0 [end] +ip test-ip4 prerouting + [ ct load mark => reg 1 ] + [ lookup reg 1 set map%d dreg 1 ] + [ nat dnat ip addr_min reg 1 addr_max reg 0 ] + +# dnat ct mark . ip daddr map { 0x00000014 . 1.1.1.1 : 1.2.3.4} +map%d test-ip4 b +map%d test-ip4 0 + element 00000014 01010101 : 04030201 0 [end] +ip test-ip4 output + [ ct load mark => reg 1 ] + [ payload load 4b @ network header + 16 => reg 9 ] + [ lookup reg 1 set map%d dreg 1 ] + [ nat dnat ip addr_min reg 1 addr_max reg 0 ] + |