Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3426410pxf; Mon, 29 Mar 2021 01:45:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuPMGqLBGUl1Qh1Y3+ou+zNUdeiZbBmehRx7jQ1rnSo18Rm8MgETc1ougN/7rJ4lq9ISRb X-Received: by 2002:aa7:c94b:: with SMTP id h11mr2020346edt.160.1617007534471; Mon, 29 Mar 2021 01:45:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617007534; cv=none; d=google.com; s=arc-20160816; b=V/adV9tulgXNXo1SChrX6RU5aFi9JEDPcCAbp4qOSr/bSCfHwUONT/JQoHCpfRrQUs 7wvueTBQ0M7FGnqi3ytuBwy+/7b2BDJhapusW20X7P4nURfiQ6Hm6b5KTshy3WaeyKdV Nkq6mdvX4bAIfK/aeIK2/5By+9Me0QONb1grPFEOWHgPblaJaPPAo7XKDaWhCZ3m4jiE P4mr8x9/oggc9Fz9Vt5J6o9VXBK1tBplxUWXpgvO4VyR9Hc4DB/yYLdkjUKPw05hc/3k hoLi10oKw9O7VVDpsMSoZ0F/dr+DAEqZbyK0Znid1G/mmLBQb861yeHv239jO+jX0MD8 6q8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6gGjwhfE36oPUa/9mwGMxboX5BtBFWfMkI/hfeBdgR8=; b=Qk1CiIIqyxiyoSFNeksbhFGjnmXpOCMK2Qwv2Psl/gawkzw7rPN6Tn5uUx2C79M4Jh Pogv/fLwdJFOI9NbVx3JJTaYavXc+bXD6saxSgjCz83C8WG5j+14awqRR1z524s6OEx+ sQXxk7AJ0+67B/u8y0xKc6aMUXfWbd8t+vJFniCRvNqauxn9PpMvKcyZ0Xs3VFhmPZtb nDbS7O8LZkPRwo4ZNp/0TO2j4UsNd+bihEOt67A8Fcon23cjV8gVOMYXOZq/NqyWt6+w w0E6peWXmHCg6pro4oQyEICLsko7UNjSNnrUUsfN6KLL50HCHrDB5Waqv+5A1+KCjP6W jXrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RdxZ1CHA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a6si12938096ejs.736.2021.03.29.01.45.11; Mon, 29 Mar 2021 01:45:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RdxZ1CHA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235363AbhC2Imn (ORCPT + 99 others); Mon, 29 Mar 2021 04:42:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:42578 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233486AbhC2IY0 (ORCPT ); Mon, 29 Mar 2021 04:24:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 935C661477; Mon, 29 Mar 2021 08:24:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617006266; bh=+/qGBy0DNEW2Gd9JvjdLczG46alVAz5/l/35LavLDXc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RdxZ1CHANIvj8wGelLkJxyjSJBIemhcOkPjzCFijwEUimsUXlCQNV0NR6KZ4THmAd B6wmt3njkLg6q1D+t1eWTf9X6lDWPSwHjTu89VzKq4vCTEpJ1rJ4VD2nGduT0IRcbe /SNt+3KLAORK0/mOZQUdoq2LAt5VKN4S0VOsGRus= 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 5.10 143/221] netfilter: nftables: report EOPNOTSUPP on unsupported flowtable flags Date: Mon, 29 Mar 2021 09:57:54 +0200 Message-Id: <20210329075633.944547506@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075629.172032742@linuxfoundation.org> References: <20210329075629.172032742@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pablo Neira Ayuso [ Upstream commit 7e6136f1b7272b2202817cff37ada355eb5e6784 ] Error was not set accordingly. Fixes: 8bb69f3b2918 ("netfilter: nf_tables: add flowtable offload control plane") Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin --- net/netfilter/nf_tables_api.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 8739ef135156..7cdbe8733540 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -6753,8 +6753,10 @@ static int nf_tables_newflowtable(struct net *net, struct sock *nlsk, if (nla[NFTA_FLOWTABLE_FLAGS]) { flowtable->data.flags = ntohl(nla_get_be32(nla[NFTA_FLOWTABLE_FLAGS])); - if (flowtable->data.flags & ~NFT_FLOWTABLE_MASK) + if (flowtable->data.flags & ~NFT_FLOWTABLE_MASK) { + err = -EOPNOTSUPP; goto err3; + } } write_pnet(&flowtable->data.net, net); -- 2.30.1