Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp384577pxx; Wed, 28 Oct 2020 07:11:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnHSjUEVWFvB4xZdxdCJVp/+SoOjbhg8sDBSUNSwAJN6bAfLOmxCK4Ma8Pv3qx9zwelxzC X-Received: by 2002:ac2:5a4e:: with SMTP id r14mr2705609lfn.451.1603894299429; Wed, 28 Oct 2020 07:11:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603894299; cv=none; d=google.com; s=arc-20160816; b=fBmX/KgFAW7+SNdJDGDZ7HMut1xsEfCX99utFKwmWYgTzs9Z9ZoXzFKESTcu1yzCs0 GIMWBdt5v0ZEEDDTURYsYvReygyGj42qzST2HshH0WnXn09uI8mU99xS7I8pcHLlAT8T NBrLS2KsS1MLlcxEjJECskEzLih7tHqHILw9oSKT7YeUD5RNT0CO5y7/PYUk2u+W5wl0 T2ifeA+TO48XOZYTr/FxmoW/p4ShwR1sQ4jAkcc7oXgL8UixJfD6mZAAYbLERsFO8cjo C01Js/u0OsrPeDTzsOHgPp4/KrrzNslF9y2x82Ko2zjLhUTV9X2R5g+9+gdo50zdo9rH YoJw== 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=u1OvlO0B/EQBjT5yhPMVW4fgliLc59/9OD95Ihw30Tg=; b=SPesaRpVqicgEbo+LlGMKKqcWFiy6CCQOSEHF0qznjUBBVBhMzdG+/yM527E+hWsMn ONphyaY654iPdccUgr57QNATdmBuriYBwyElIwJmpKfm8k9oCJHefzC3DWPVmlul4zGs xFX1UbPvDeKkjFw2/xEhEpVJYnBS/znusRhT3UteRLgT2c/JSsInFDYqsjIfIRvc5xzx zxPBlZzhSR7omVINvy5A0nYm1KqyLvm1rTf6jyjeakXIxsugecY5YaBegSJUpdkB1cly x0oaOOqOg2EAHlvPf46YHYVfb/KWSH9Qc/Zt3s7ZNb9WTf/qK1G0Br09wCNKPo0w1biw W7mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TVfn4pkS; 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=fail (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 w17si2969573ejk.629.2020.10.28.07.11.16; Wed, 28 Oct 2020 07:11:39 -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=@kernel.org header.s=default header.b=TVfn4pkS; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1804814AbgJ0P54 (ORCPT + 99 others); Tue, 27 Oct 2020 11:57:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:55244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1796369AbgJ0PRs (ORCPT ); Tue, 27 Oct 2020 11:17:48 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 2D56320657; Tue, 27 Oct 2020 15:17:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603811868; bh=Agf3V4ZF8YkMqLFSxafacsyDpASget+h0/dT2MRrkWQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TVfn4pkSmbQLLzlTpURDWvMNfvbiHQbBp9LnnG2xLv3aVwMB28dMyaHGiEHv7i42j w7hjgg96Om5LHVBty8WAghM30ICFTfnvBhR084/f8aY2oLczUqizR3AjVrbWqwUl3J DhIWCiPrQkf+m5rKtqFSd72yIcduJu9PUD/RtBV4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tobias Brunner , David Ahern , Jakub Kicinski Subject: [PATCH 5.9 004/757] ipv4: Restore flowi4_oif update before call to xfrm_lookup_route Date: Tue, 27 Oct 2020 14:44:14 +0100 Message-Id: <20201027135450.729766636@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135450.497324313@linuxfoundation.org> References: <20201027135450.497324313@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: David Ahern [ Upstream commit 874fb9e2ca949b443cc419a4f2227cafd4381d39 ] Tobias reported regressions in IPsec tests following the patch referenced by the Fixes tag below. The root cause is dropping the reset of the flowi4_oif after the fib_lookup. Apparently it is needed for xfrm cases, so restore the oif update to ip_route_output_flow right before the call to xfrm_lookup_route. Fixes: 2fbc6e89b2f1 ("ipv4: Update exception handling for multipath routes via same device") Reported-by: Tobias Brunner Signed-off-by: David Ahern Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/ipv4/route.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -2769,10 +2769,12 @@ struct rtable *ip_route_output_flow(stru if (IS_ERR(rt)) return rt; - if (flp4->flowi4_proto) + if (flp4->flowi4_proto) { + flp4->flowi4_oif = rt->dst.dev->ifindex; rt = (struct rtable *)xfrm_lookup_route(net, &rt->dst, flowi4_to_flowi(flp4), sk, 0); + } return rt; }