diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-07-13 20:18:27 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-07-13 20:25:33 +0200 |
commit | c68314dd4263575abaed43e052c7e61f6b359040 (patch) | |
tree | 858f9baaf7ebd9e697ca224739319c314b9519c2 /src/statement.c | |
parent | 9b169bfc650ebeb81aff80ba2bf87d729dc3143e (diff) |
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>
Diffstat (limited to 'src/statement.c')
-rw-r--r-- | src/statement.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/statement.c b/src/statement.c index 6db7e397..06742c04 100644 --- a/src/statement.c +++ b/src/statement.c @@ -673,9 +673,7 @@ static void nat_stmt_print(const struct stmt *stmt, struct output_ctx *octx) break; } - if (stmt->nat.type_flags & STMT_NAT_F_CONCAT) - nft_print(octx, " addr . port"); - else if (stmt->nat.type_flags & STMT_NAT_F_PREFIX) + if (stmt->nat.type_flags & STMT_NAT_F_PREFIX) nft_print(octx, " prefix"); nft_print(octx, " to"); |