Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7150000ybi; Mon, 8 Jul 2019 15:38:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtjFo0GuYLuQO0n8L7DwXZPpshTPquZyyyMUBMQNk9yRJ18hXpmULipLAk/53PG9Gr9Ayn X-Received: by 2002:a17:902:9a49:: with SMTP id x9mr28018732plv.282.1562625538861; Mon, 08 Jul 2019 15:38:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562625538; cv=none; d=google.com; s=arc-20160816; b=XjlSTUomUbTu3xM3htQf43Bm7VHKMMnf2pJ30XLdvN5tJ+wp57EVK8vJM/SxoXyx9K zuB4KEDIszjSdI2AphRkuAxSGXjxhJLSD6A6EZ6kKZ17BlJkcsnPPgJl6sYTRBwG3igu u3c5kTc4zklGh37JMXkTEh5O8SNbGbTYOWv00SaXbg4y/Ubq5U6kBjtdkOvsks81mWUw jkTyMc1DmpCPScOZ7Z+ah0eCQ17Chepc+P1noa1UHXJf+NmsY/+wOH/FhAZiCHfR2Bfk hR+uKHE4dmLLO6cdTP4fQmqzdK17ydfSCmLF9xK6RyYvEl4LbnIIVfouAr33j1c9PTxv 0NZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Oivz6LXZEAeIbJDosAlj78YUO1xJK79Q4L/j6K4n6cI=; b=cIBjijwhdGbbjQqm25UpgtOVpOR3LPfHIway0CR1GcN+Ga4rlcBooaYsknpZZ0DJWf /VqBmRZxX11AMKTLBAcwWf+FBA8Qxlt/qT7uV+//RydmWVGQYNk3vVLtr+0KwQFBaTgK wBQHWVKq7QeUzVNltuQndvngCd5pX8ionv6ez/Ynt1AyCAdYlBLJk+F+eMcnBGUQoZ11 KYcI4X2MnNcpQFfomN66y8CNO0jQs18Ys8+Wi9ZHuwPb6kZGvdEk+yd4Spk+/nqXjYaA 0g2naWYi4Fl4ZAk2AABC66S/62KrqJTqheIjM1+R35OsAKt8gujHxEPYOP5Y8y3t4SU0 m3mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kK2Hztgx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n13si20429983pff.46.2019.07.08.15.38.43; Mon, 08 Jul 2019 15:38:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kK2Hztgx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389224AbfGHP2H (ORCPT + 99 others); Mon, 8 Jul 2019 11:28:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:56484 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389210AbfGHP2D (ORCPT ); Mon, 8 Jul 2019 11:28:03 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7B7142173C; Mon, 8 Jul 2019 15:28:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562599683; bh=D5ayUhAsF0VdP8RdtN5yXJViL+YPdWibDMqRp+evdtA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kK2HztgxOapYYvRfXtHl9laEsiYMGOHI8j5R69TsdOxJ2ZN5ZswfSvgtEngnyI/7t AMe2ZAKuH2yb3S947Ld2Iaqgcc2HTg++5b4dbq4N3k1rt7xkTQb+CWeXMRwFDlGBdc wXO0Blr4CM79Qt2dMtREakZ3i9WLPSBazWUHDtIg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Florian Westphal , Pablo Neira Ayuso Subject: [PATCH 4.19 06/90] netfilter: nft_flow_offload: dont offload when sequence numbers need adjustment Date: Mon, 8 Jul 2019 17:12:33 +0200 Message-Id: <20190708150522.724082827@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190708150521.829733162@linuxfoundation.org> References: <20190708150521.829733162@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Florian Westphal commit 91a9048f238063dde7feea752b9dd386f7e3808b upstream. We can't deal with tcp sequence number rewrite in flow_offload. While at it, simplify helper check, we only need to know if the extension is present, we don't need the helper data. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso Signed-off-by: Greg Kroah-Hartman --- net/netfilter/nft_flow_offload.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/net/netfilter/nft_flow_offload.c +++ b/net/netfilter/nft_flow_offload.c @@ -12,7 +12,6 @@ #include #include #include -#include struct nft_flow_offload { struct nft_flowtable *flowtable; @@ -67,7 +66,6 @@ static void nft_flow_offload_eval(const { struct nft_flow_offload *priv = nft_expr_priv(expr); struct nf_flowtable *flowtable = &priv->flowtable->data; - const struct nf_conn_help *help; enum ip_conntrack_info ctinfo; struct nf_flow_route route; struct flow_offload *flow; @@ -93,8 +91,8 @@ static void nft_flow_offload_eval(const goto out; } - help = nfct_help(ct); - if (help) + if (nf_ct_ext_exist(ct, NF_CT_EXT_HELPER) || + ct->status & IPS_SEQ_ADJUST) goto out; if (ctinfo == IP_CT_NEW ||