]> git.ipfire.org Git - thirdparty/nftables.git/commit
src: infer NAT mapping with concatenation from set
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 13 Jul 2021 18:18:27 +0000 (20:18 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 13 Jul 2021 18:25:33 +0000 (20:25 +0200)
commitc68314dd4263575abaed43e052c7e61f6b359040
tree858f9baaf7ebd9e697ca224739319c314b9519c2
parent9b169bfc650ebeb81aff80ba2bf87d729dc3143e
src: infer NAT mapping with concatenation from set

If the map is anonymous, infer it from the set elements. Otherwise, the
set definition already have an explicit concatenation definition in the
data side of the mapping.

This update simplifies the NAT mapping syntax with concatenations, e.g.

 snat ip to ip saddr map { 10.141.11.4 : 192.168.2.3 . 80 }

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/evaluate.c
src/json.c
src/statement.c
tests/py/ip/snat.t
tests/py/ip/snat.t.payload
tests/shell/testcases/maps/dumps/0010concat_map_0.nft
tests/shell/testcases/maps/dumps/nat_addr_port.nft