diff options
| author | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-08-21 16:32:44 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-09-05 10:26:30 +0200 |
| commit | a9982b60c400f837967b25d2a1cd754a234872d8 (patch) | |
| tree | 1722c6ec734aeb0e32843967eed9f9d6751ca11a | |
| parent | 1b4fd81e36c0714a57a330a7c114bfebffd277b0 (diff) | |
| download | linux-a9982b60c400f837967b25d2a1cd754a234872d8.tar.gz linux-a9982b60c400f837967b25d2a1cd754a234872d8.tar.bz2 linux-a9982b60c400f837967b25d2a1cd754a234872d8.zip | |
netfilter: nft_tunnel: restrict it to netdev family
[ Upstream commit 01e4092d53bc4fe122a6e4b6d664adbd57528ca3 ]
Only allow to use this expression from NFPROTO_NETDEV family.
Fixes: af308b94a2a4 ("netfilter: nf_tables: add tunnel support")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
| -rw-r--r-- | net/netfilter/nft_tunnel.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/netfilter/nft_tunnel.c b/net/netfilter/nft_tunnel.c index 8ae948fd9dcf..3fc55c81f16a 100644 --- a/net/netfilter/nft_tunnel.c +++ b/net/netfilter/nft_tunnel.c @@ -104,6 +104,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, |
