diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-04-27 22:12:21 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-04-28 17:35:56 +0200 |
commit | 6a8668b1fded4fbc908a35ee2b49a2d0b70a1a24 (patch) | |
tree | 282acf8228bc32bf1df9a28f238b96eb03d1d38e /tests/shell/testcases/sets/0046netmap_0 | |
parent | 9fef2dc765c53cc15fb021ac36ad3da0cfcebd2d (diff) |
tests: shell: add NAT mappings tests
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell/testcases/sets/0046netmap_0')
-rwxr-xr-x | tests/shell/testcases/sets/0046netmap_0 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/shell/testcases/sets/0046netmap_0 b/tests/shell/testcases/sets/0046netmap_0 new file mode 100755 index 00000000..2804a4a2 --- /dev/null +++ b/tests/shell/testcases/sets/0046netmap_0 @@ -0,0 +1,14 @@ +#!/bin/bash + +EXPECTED="table ip x { + chain y { + type nat hook postrouting priority srcnat; policy accept; + snat ip prefix to ip saddr map { 10.141.11.0/24 : 192.168.2.0/24, + 10.141.12.0/24 : 192.168.3.0/24, + 10.141.13.0/24 : 192.168.4.0/24 } + } + } +" + +set -e +$NFT -f - <<< $EXPECTED |