提交 26b01d4b 编写于 作者: P Pablo Neira Ayuso 提交者: Zheng Zengkai

netfilter: nft_tunnel: restrict it to netdev family

stable inclusion
from stable-v5.10.140
commit 35519ce7bac9138b00126817c7ddb8f4ebdbc066
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I63FTT

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=35519ce7bac9138b00126817c7ddb8f4ebdbc066

--------------------------------

[ Upstream commit 01e4092d ]

Only allow to use this expression from NFPROTO_NETDEV family.

Fixes: af308b94 ("netfilter: nf_tables: add tunnel support")
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
上级 cf7071b3
......@@ -133,6 +133,7 @@ static const struct nft_expr_ops nft_tunnel_get_ops = {
static struct nft_expr_type nft_tunnel_type __read_mostly = {
.name = "tunnel",
.family = NFPROTO_NETDEV,
.ops = &nft_tunnel_get_ops,
.policy = nft_tunnel_policy,
.maxattr = NFTA_TUNNEL_MAX,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册