Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp448734ybl; Tue, 28 Jan 2020 06:09:53 -0800 (PST) X-Google-Smtp-Source: APXvYqwxZVgllWRYf2FlnDeBzm2FFaGX4xkIog3XfmskWaZl+z2qstWN+ZGBvr+XH3wOAZxxs1Kk X-Received: by 2002:aca:5905:: with SMTP id n5mr2987368oib.54.1580220593326; Tue, 28 Jan 2020 06:09:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580220593; cv=none; d=google.com; s=arc-20160816; b=FRNAOPXS+mGCqrNIRqNOfVsNzZLKF3qVTSQlWEbraJeHVkEzdZ/LNlbmznxi0qA+x6 yeNMg8krNyThex+G+ngyexvT5fGf/uha6TCzMIYUBkycF0wqrdYXC3lLvZOJ9eVGQhu7 OxFoq3QKd93Srr5/8NDy5+p7M2qb/uABwnbDEBrIPEzL6QIwS8FQ6tBVP/o18LmzCvFD WIGfOYokX83qVfb8NO2QoHEa5nzpU/8Y5lboNCHCmd2YjNJ7D1h+aVfSZ+smgL2e5gbz 0I8lXdwBZyEZSbaLc7AE02iAZp1tVr25B3wTzStMXd8WR9KR5kdYo7yKAHUYZRlOGKKx +m6g== 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=vKqDO6wkMH857x2GDk12ntNhZzp7l50X0vBD+fj6Ib4=; b=cXoC572MKXXel90MLiXkpw1UN3AC8OJzvdkgt347c5uGqx0wJVyBgpRxs+ktGJEBzK A7YLhOd3yh5og1zsnZ+7aAVp4H3YAxidyfka2vEOzsm0+KQU+2MsEo9KKLMniDCS7vii du2HuxT4kLsvKNqcRRR8QTKvVkGbY7zwyZjrxgLi0fkFTnFT3tpGlWtSjlAboSuStqgV aATfIoINrON15Tahh3HDo1uEhBPOCvUyDUWfOZ9YvXvFj0F5Jcp4yIPEeKvf68gqw2cH OOJf7vNdOQUaWN1+SnYR0dvOIQBM3UOzvBx6FbM0lKAgvY3o4ggiNeEKrnMo0YdeNmyU oYCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IvXGz8++; 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 h7si7679786otm.165.2020.01.28.06.09.35; Tue, 28 Jan 2020 06:09:53 -0800 (PST) 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=IvXGz8++; 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 S1728289AbgA1OFa (ORCPT + 99 others); Tue, 28 Jan 2020 09:05:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:53102 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728274AbgA1OF2 (ORCPT ); Tue, 28 Jan 2020 09:05:28 -0500 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 6762E2468A; Tue, 28 Jan 2020 14:05:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580220327; bh=p99L67TBU8jVHLId7ZCRFvMml//FY6jErV0aGLQrcvs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IvXGz8++l0i1lQXJ38AfJ7T3j54u5+wV/ele6oFsV8RQrKtjK6618ZC92hmYTaKRa jErw6J1hHEYjcsxTbEjcwbCaJIy0rnUZfz9DFdgb0sCHthMbkMg1ptEUxaAqx2oL4l 8I3BEoksA/eIrWnwpMAN453jqv+l/sMqJLTWw2WI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ulrich Weber , Steffen Klassert Subject: [PATCH 5.4 083/104] xfrm: support output_mark for offload ESP packets Date: Tue, 28 Jan 2020 15:00:44 +0100 Message-Id: <20200128135828.650597485@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135817.238524998@linuxfoundation.org> References: <20200128135817.238524998@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: Ulrich Weber commit 4e4362d2bf2a49ff44dbbc9585207977ca3d71d0 upstream. Commit 9b42c1f179a6 ("xfrm: Extend the output_mark") added output_mark support but missed ESP offload support. xfrm_smark_get() is not called within xfrm_input() for packets coming from esp4_gro_receive() or esp6_gro_receive(). Therefore call xfrm_smark_get() directly within these functions. Fixes: 9b42c1f179a6 ("xfrm: Extend the output_mark to support input direction and masking.") Signed-off-by: Ulrich Weber Signed-off-by: Steffen Klassert Signed-off-by: Greg Kroah-Hartman --- net/ipv4/esp4_offload.c | 2 ++ net/ipv6/esp6_offload.c | 2 ++ 2 files changed, 4 insertions(+) --- a/net/ipv4/esp4_offload.c +++ b/net/ipv4/esp4_offload.c @@ -57,6 +57,8 @@ static struct sk_buff *esp4_gro_receive( if (!x) goto out_reset; + skb->mark = xfrm_smark_get(skb->mark, x); + sp->xvec[sp->len++] = x; sp->olen++; --- a/net/ipv6/esp6_offload.c +++ b/net/ipv6/esp6_offload.c @@ -79,6 +79,8 @@ static struct sk_buff *esp6_gro_receive( if (!x) goto out_reset; + skb->mark = xfrm_smark_get(skb->mark, x); + sp->xvec[sp->len++] = x; sp->olen++;