netfilter: nft_nat: allow to specify layer 4 protocol NAT only
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 20 Jul 2021 16:22:50 +0000 (18:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Aug 2021 09:58:03 +0000 (11:58 +0200)
commit2e3301b484bc593f59da2be15454625f41caa518
tree05cd59b672e65f071a233beb8f8847309f4fb287
parent789a3a3c94a8f594612543969a2d125178d17941
netfilter: nft_nat: allow to specify layer 4 protocol NAT only

[ Upstream commit a33f387ecd5aafae514095c2c4a8c24f7aea7e8b ]

nft_nat reports a bogus EAFNOSUPPORT if no layer 3 information is specified.

Fixes: d07db9884a5f ("netfilter: nf_tables: introduce nft_validate_register_load()")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nft_nat.c