]> 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:28:04 +0000 (13:28 +0100)
[ Upstream commit 493924519b1fe3faab13ee621a43b0d0939abab1 ]

`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 43eeb1f609f135ab7db6033e067c032b48c8a49a..d75de63189b61ca7aa399246939972e87e0eba6c 100644 (file)
@@ -236,7 +236,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,
 };