aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2018-10-16 10:52:05 -0400
committerPablo Neira Ayuso <pablo@netfilter.org>2018-10-16 13:34:49 -0400
commitcb20f2d2c0507d60d94ef896991e95708f051dd1 (patch)
tree6bdba61d1af87712a44df86e48dc66a00862fac9
parentd701d8117200399d85e63a737d2e4e897932f3b6 (diff)
netfilter: xt_nat: fix DNAT target for shifted portmap ranges
The commit 2eb0f624b709 ("netfilter: add NAT support for shifted portmap ranges") did not set the checkentry/destroy callbacks for the newly added DNAT target. As a result, rulesets using only such nat targets are not effective, as the relevant conntrack hooks are not enabled. The above affect also nft_compat rulesets. Fix the issue adding the missing initializers. Fixes: 2eb0f624b709 ("netfilter: add NAT support for shifted portmap ranges") Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--net/netfilter/xt_nat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/netfilter/xt_nat.c b/net/netfilter/xt_nat.c
index 8af9707f8789..ac91170fc8c8 100644
--- a/net/netfilter/xt_nat.c
+++ b/net/netfilter/xt_nat.c
@@ -216,6 +216,8 @@ static struct xt_target xt_nat_target_reg[] __read_mostly = {
216 { 216 {
217 .name = "DNAT", 217 .name = "DNAT",
218 .revision = 2, 218 .revision = 2,
219 .checkentry = xt_nat_checkentry,
220 .destroy = xt_nat_destroy,
219 .target = xt_dnat_target_v2, 221 .target = xt_dnat_target_v2,
220 .targetsize = sizeof(struct nf_nat_range2), 222 .targetsize = sizeof(struct nf_nat_range2),
221 .table = "nat", 223 .table = "nat",