From nobody Wed Sep 3 01:54:02 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3F33C54EE9 for ; Fri, 2 Sep 2022 12:32:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236518AbiIBMcA (ORCPT ); Fri, 2 Sep 2022 08:32:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236500AbiIBMbN (ORCPT ); Fri, 2 Sep 2022 08:31:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57D38E0FEA; Fri, 2 Sep 2022 05:26:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8C24EB82A9B; Fri, 2 Sep 2022 12:24:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE9D1C433C1; Fri, 2 Sep 2022 12:24:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662121469; bh=XhSA6i78gRXQyA/gUEzf/4yuSlQlvNRY85EE198trDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C4dYrNBggteu2XOwHl8UmJ3QpNS2elrWJqBIZaN4+wwgHQ/wc7mZTe/RcsL0odpq+ s9eASFWSOVXl/Fcy0mhZRH05ZvxyA4oy5et5v+ej+dWZtH9xZ2G8SHfWcpyXNX9HEY U598Yml+ezZGbZVOM2ZGQ73YxPikSgzaNuMnAk64= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 4.19 18/56] netfilter: nft_tunnel: restrict it to netdev family Date: Fri, 2 Sep 2022 14:18:38 +0200 Message-Id: <20220902121400.805271386@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220902121400.219861128@linuxfoundation.org> References: <20220902121400.219861128@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Pablo Neira Ayuso [ 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 Signed-off-by: Sasha Levin --- net/netfilter/nft_tunnel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/netfilter/nft_tunnel.c b/net/netfilter/nft_tunnel.c index 8ae948fd9dcfc..3fc55c81f16ac 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 =3D= { =20 static struct nft_expr_type nft_tunnel_type __read_mostly =3D { .name =3D "tunnel", + .family =3D NFPROTO_NETDEV, .ops =3D &nft_tunnel_get_ops, .policy =3D nft_tunnel_policy, .maxattr =3D NFTA_TUNNEL_MAX, --=20 2.35.1