From mboxrd@z Thu Jan 1 00:00:00 1970 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 541C7C001E0 for ; Mon, 23 Oct 2023 11:05:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233296AbjJWLFu (ORCPT ); Mon, 23 Oct 2023 07:05:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230513AbjJWLFt (ORCPT ); Mon, 23 Oct 2023 07:05:49 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 593EE10C3 for ; Mon, 23 Oct 2023 04:05:48 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95E7BC433C8; Mon, 23 Oct 2023 11:05:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1698059148; bh=P1jFpBMmufE5fTIMDv+8Zh3tPCs2xsf3WhPLpUAW4Qs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nka3GrwsvCl/HDCqtF7b7D8pCcD0yxpFVyL3xq98eZNJ/aoyxjI5FscJhnRPkNcZs WWsq5wYXSlkjAto0rCDZ1MSQw/G/NFjDwxaxt26L7hpglY7YyGdAiGjUVNtG40Tkao i5Unbb/tYDFQCdT5ADje2EweCDqX56ZgfJ4doVRI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Aaron Conole , "David S. Miller" Subject: [PATCH 6.5 079/241] selftests: openvswitch: Fix the ct_tuple for v4 Date: Mon, 23 Oct 2023 12:54:25 +0200 Message-ID: <20231023104835.813283733@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231023104833.832874523@linuxfoundation.org> References: <20231023104833.832874523@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 6.5-stable review patch. If anyone has any objections, please let me know. ------------------ From: Aaron Conole commit 8eff0e062201e26739c74ac2355b7362622b7190 upstream. The ct_tuple v4 data structure decode / encode routines were using the v6 IP address decode and relying on default encode. This could cause exceptions during encode / decode depending on how a ct4 tuple would appear in a netlink message. Caught during code review. Fixes: e52b07aa1a54 ("selftests: openvswitch: add flow dump support") Signed-off-by: Aaron Conole Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/net/openvswitch/ovs-dpctl.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/tools/testing/selftests/net/openvswitch/ovs-dpctl.py +++ b/tools/testing/selftests/net/openvswitch/ovs-dpctl.py @@ -732,12 +732,14 @@ class ovskey(nla): "src", lambda x: str(ipaddress.IPv4Address(x)), int, + convert_ipv4, ), ( "dst", "dst", - lambda x: str(ipaddress.IPv6Address(x)), + lambda x: str(ipaddress.IPv4Address(x)), int, + convert_ipv4, ), ("tp_src", "tp_src", "%d", int), ("tp_dst", "tp_dst", "%d", int),