]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netfilter: xt_nat: fix DNAT target for shifted portmap ranges
authorPaolo Abeni <pabeni@redhat.com>
Tue, 16 Oct 2018 14:52:05 +0000 (16:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:12:19 +0000 (11:12 -0800)
commit3967f93cb91b29a9cc64d4920a82aae353b762dd
treeae7e167fd5212f73c6074109620b04b337e249e6
parent0713bef08f090b7df69b58b73f41fdc370366435
netfilter: xt_nat: fix DNAT target for shifted portmap ranges

[ Upstream commit cb20f2d2c0507d60d94ef896991e95708f051dd1 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/xt_nat.c