From patchwork Thu Apr 20 08:02:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 13218065 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 829BAC77B73 for ; Thu, 20 Apr 2023 08:03:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234247AbjDTIDJ (ORCPT ); Thu, 20 Apr 2023 04:03:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234251AbjDTIDH (ORCPT ); Thu, 20 Apr 2023 04:03:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9984B2680 for ; Thu, 20 Apr 2023 01:03:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 33ADA6413B for ; Thu, 20 Apr 2023 08:03:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C444C433D2; Thu, 20 Apr 2023 08:03:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681977785; bh=j2NEKxArP5vDlLGPeRhYIOj4vYMq7DHZ40wfLT8YvyU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XNW7YraGXD8FrobJP5agcnFW8aSzzclBupNXPH8QuQ6pFpZ9jhlgSQAMTiSAuSX/N KA42JhiwgkMUG4GgRim5Uq1j1xHHqho3TrXPCyvP9ZjqeajcpVLTp5WgF75j/TQUzg TcGrtSE8Vyo1XvcJ5OflaMax1Iv8tkScyJfM8j6BxVsYFhtNXKp6U2egCMyJja6/02 o+wA7/PnIqsbSYCFPqDNpz7PQL/7ligc8VONERuu+/7/+56bkLU8DDyzfxd8HWaeYU N+ZSoJ/x6NFJTbh5CrArmmR4sac53cT3kLmkpW1qOgmDzDowQ99uVApkXuOxoWQt3J AN/Ph29Qgs3og== From: Leon Romanovsky To: Jakub Kicinski Cc: Leon Romanovsky , Emeel Hakim , Eric Dumazet , netdev@vger.kernel.org, Paolo Abeni , Raed Salem , Saeed Mahameed , Steffen Klassert , Simon Horman Subject: [PATCH net-next 3/5] net/mlx5e: Compare all fields in IPv6 address Date: Thu, 20 Apr 2023 11:02:49 +0300 Message-Id: <269e24dc9fb30549d4f77895532603734f515650.1681976818.git.leon@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Leon Romanovsky Fix size argument in memcmp to compare whole IPv6 address. Fixes: b3beba1fb404 ("net/mlx5e: Allow policies with reqid 0, to support IKE policy holes") Reviewed-by: Raed Salem Reviewed-by: Emeel Hakim Signed-off-by: Leon Romanovsky Reviewed-by: Simon Horman --- drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h index f7f7c09d2b32..4e9887171508 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h @@ -287,7 +287,7 @@ static inline bool addr6_all_zero(__be32 *addr6) { static const __be32 zaddr6[4] = {}; - return !memcmp(addr6, zaddr6, sizeof(*zaddr6)); + return !memcmp(addr6, zaddr6, sizeof(zaddr6)); } #else static inline void mlx5e_ipsec_init(struct mlx5e_priv *priv)