Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3712458pxv; Mon, 26 Jul 2021 10:01:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwh76B30V3BkhQjGtMBaJ3cy5Pyq8A6GRfSFSL4QMOZTrNStcnze8tVPq4bMMDA1ljoGhKg X-Received: by 2002:a17:906:94cd:: with SMTP id d13mr668645ejy.158.1627318902860; Mon, 26 Jul 2021 10:01:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627318902; cv=none; d=google.com; s=arc-20160816; b=ch91WdhVi6tjtfz35+IXITDF5elWA35vsK78Wt4+FRgGOpXNHE1tL6thXWUCJTNkz5 EZM7Oc2FEi0EJXRFPhXBN2Pz6qj0UB2U7zli0EatL3gc4M9zfmls7y1hefdouec9Qyqz kV6eaRMSNY2qUf/r9EDw8xVRSMuEt+Yh2XesdkLPiC5TxWiSXHg1aCxaGGomeUr38Vr3 UTHjXAz8CAZKe4oKTMKz2ojFOeMi1q+cvWWZc+xrhx3tj9KRwVxPyYBdM4thHLiPwZZU nQqsO0+FNgQ9qFFvyYPPHHOK1/GnDISr5ctBPod/ui8poEZppCXaIfkb205pJxnCjJR/ COoA== 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=g8NmzznPA6TVrsGAd1/BIi20WFCMLvHhBf2dzr3CDp0=; b=Jx0diOS3lkSpzI2lYASng3WMzdEzmZQkeVJZVRjghiSCBW16bfhdQgUXcPZzB2D4Zj pfRcKnHRRXKhtaEkjwlX/j1ky/EPz0Zy8rmXRORav5SSh1noS9Mq/D4pFCNjnha/o6Fo MjRZ2QDBBbk0vw47wzlxKxMnkFBf+W4Ksiaz8BZHYuX1xd6qeMDiQ/UjuZWtqWvEbLlb QXFBicMY2Vs/dxlIDx1xZREdjOvUpIMDuY26KGMb/DlT04SafybrBZoY3JIIVnimJcd8 FhYJWTpPx0cVtAUvYd5a2/4p2X7xmu/ZPVawMcDl0qIwspCN9jCSZpRA5ZfoOmpaC5Zg PcIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="wjYwL/SU"; 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 h14si465921edq.245.2021.07.26.10.01.18; Mon, 26 Jul 2021 10:01:42 -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="wjYwL/SU"; 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 S234692AbhGZPfM (ORCPT + 99 others); Mon, 26 Jul 2021 11:35:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:33718 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237023AbhGZPUV (ORCPT ); Mon, 26 Jul 2021 11:20:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 679A860F38; Mon, 26 Jul 2021 16:00:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627315250; bh=9QPATj0j3nNfBZVXcRtDXi7i2TMPNMMeWT7KfEhVR6Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wjYwL/SUL+JgnlWTa9aOmm2feUFEGTBBRizci5/k5x4vOLHmaU5ifBafiugmKYM+8 WaCzWxIOaw3dolARnsjT02wJq65OoLuUq4ij2jG6JOvgXEzGJjd+Y+eXyhhES0G0CC GLGjjGZj9dL7eTWhGvgox+OsOVsbUMi3v6/PmUzQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Taehee Yoo , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 022/167] bonding: fix incorrect return value of bond_ipsec_offload_ok() Date: Mon, 26 Jul 2021 17:37:35 +0200 Message-Id: <20210726153840.111435054@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210726153839.371771838@linuxfoundation.org> References: <20210726153839.371771838@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: Taehee Yoo [ Upstream commit 168e696a36792a4a3b2525a06249e7472ef90186 ] bond_ipsec_offload_ok() is called to check whether the interface supports ipsec offload or not. bonding interface support ipsec offload only in active-backup mode. So, if a bond interface is not in active-backup mode, it should return false but it returns true. Fixes: a3b658cfb664 ("bonding: allow xfrm offload setup post-module-load") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/bonding/bond_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 9aa2d79aa942..1a795a858630 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -565,7 +565,7 @@ static bool bond_ipsec_offload_ok(struct sk_buff *skb, struct xfrm_state *xs) real_dev = curr_active->dev; if (BOND_MODE(bond) != BOND_MODE_ACTIVEBACKUP) { - err = true; + err = false; goto out; } -- 2.30.2