]> git.baikalelectronics.ru Git - kernel.git/commitdiff
netfilter: nft_redir: correct value of inet type `.maxattrs`
authorJeremy Sowden <jeremy@azazel.net>
Tue, 7 Mar 2023 23:22:59 +0000 (23:22 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2023 12:33:42 +0000 (13:33 +0100)
[ Upstream commit 7c1e764b9009b6e37f05cd584cef31a9b4f6f520 ]

`nft_redir_inet_type.maxattrs` was being set, presumably because of a
cut-and-paste error, to `NFTA_MASQ_MAX`, instead of `NFTA_REDIR_MAX`.

Fixes: d4fde61fd9d3 ("netfilter: nft_redir: add inet support")
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Reviewed-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nft_redir.c

index 7ae330d75ac7be2e991a5f3ca5cc1aacd5f2bc24..5ed64b2bd15e8f589842109d93ddd79e3c7f4135 100644 (file)
@@ -235,7 +235,7 @@ static struct nft_expr_type nft_redir_inet_type __read_mostly = {
        .name           = "redir",
        .ops            = &nft_redir_inet_ops,
        .policy         = nft_redir_policy,
-       .maxattr        = NFTA_MASQ_MAX,
+       .maxattr        = NFTA_REDIR_MAX,
        .owner          = THIS_MODULE,
 };