diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-07-13 20:18:15 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-07-13 20:21:32 +0200 |
commit | 9b169bfc650ebeb81aff80ba2bf87d729dc3143e (patch) | |
tree | a1d74be596b5d715a80cdac6f460ace1ea556115 /tests | |
parent | b73ff88cf011ec53ee66a9b1a99b34aea0db63f4 (diff) |
src: remove STMT_NAT_F_INTERVAL flags and interval keyword
STMT_NAT_F_INTERVAL is not useful, the keyword interval can be removed
to simplify the syntax, e.g.
snat to ip saddr map { 10.141.11.4 : 192.168.2.2-192.168.2.4 }
This patch reworks 9599d9d25a6b ("src: NAT support for intervals in
maps").
Do not remove STMT_NAT_F_INTERVAL yet since this flag is needed for
interval concatenations coming in a follow up patch.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/py/ip/snat.t | 2 | ||||
-rw-r--r-- | tests/py/ip/snat.t.payload | 2 | ||||
-rwxr-xr-x | tests/shell/testcases/sets/0047nat_0 | 2 | ||||
-rw-r--r-- | tests/shell/testcases/sets/dumps/0047nat_0.nft | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/tests/py/ip/snat.t b/tests/py/ip/snat.t index c6e8a8e6..56ab943e 100644 --- a/tests/py/ip/snat.t +++ b/tests/py/ip/snat.t @@ -10,5 +10,5 @@ iifname "eth0" tcp dport != {80, 90, 23} snat to 192.168.3.2;ok iifname "eth0" tcp dport != 23-34 snat to 192.168.3.2;ok snat ip addr . port to ip saddr map { 10.141.11.4 : 192.168.2.3 . 80 };ok -snat ip interval to ip saddr map { 10.141.11.4 : 192.168.2.2-192.168.2.4 };ok +snat ip to ip saddr map { 10.141.11.4 : 192.168.2.2-192.168.2.4 };ok snat ip prefix to ip saddr map { 10.141.11.0/24 : 192.168.2.0/24 };ok diff --git a/tests/py/ip/snat.t.payload b/tests/py/ip/snat.t.payload index ef4c1ce9..2a03ff1f 100644 --- a/tests/py/ip/snat.t.payload +++ b/tests/py/ip/snat.t.payload @@ -69,7 +69,7 @@ ip [ lookup reg 1 set __map%d dreg 1 ] [ nat snat ip addr_min reg 1 proto_min reg 9 ] -# snat ip interval to ip saddr map { 10.141.11.4 : 192.168.2.2-192.168.2.4 } +# snat ip to ip saddr map { 10.141.11.4 : 192.168.2.2-192.168.2.4 } __map%d test-ip4 b size 1 __map%d test-ip4 0 element 040b8d0a : 0202a8c0 0402a8c0 0 [end] diff --git a/tests/shell/testcases/sets/0047nat_0 b/tests/shell/testcases/sets/0047nat_0 index 746a6b6d..cb1d4d68 100755 --- a/tests/shell/testcases/sets/0047nat_0 +++ b/tests/shell/testcases/sets/0047nat_0 @@ -10,7 +10,7 @@ EXPECTED="table ip x { chain y { type nat hook postrouting priority srcnat; policy accept; - snat ip interval to ip saddr map @y + snat to ip saddr map @y } } " diff --git a/tests/shell/testcases/sets/dumps/0047nat_0.nft b/tests/shell/testcases/sets/dumps/0047nat_0.nft index 70730ef3..e7968054 100644 --- a/tests/shell/testcases/sets/dumps/0047nat_0.nft +++ b/tests/shell/testcases/sets/dumps/0047nat_0.nft @@ -8,6 +8,6 @@ table ip x { chain y { type nat hook postrouting priority srcnat; policy accept; - snat ip interval to ip saddr map @y + snat ip to ip saddr map @y } } |