Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1688299lqt; Wed, 20 Mar 2024 10:59:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWdjWRJj9YoNKV+FH6596klJ5VBYW/f9DlG9fN9musj4P6O2Unngh33d/YEpOCKAMwj+CYJNLA9yiBQEHYhyZ9eTQ+Q/OkOoDUbkaqoOw== X-Google-Smtp-Source: AGHT+IEXJC4dyMf5rllh5dASoS2S4wETLFYFdcaYNp9PYUDFVcGDChuI4KY+a1ldxJunSBO1YhMK X-Received: by 2002:a4a:6f0b:0:b0:5a2:37c9:d91f with SMTP id h11-20020a4a6f0b000000b005a237c9d91fmr16613767ooc.5.1710957574315; Wed, 20 Mar 2024 10:59:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710957574; cv=pass; d=google.com; s=arc-20160816; b=tihEAyHQpMb7r8nd43WfJmOxDrE/AQXTz3Um55RRsSgzgNoVRBUu/2Jg/whf8h/4H2 YdLjQYL2WC09VQ8aQCAoW0XUMXk8WX0zTLoo42jS58DLVbsssfqEDbTWV83VTSxRD1t9 FN9+Ax2DMJFhWolGIorw/MA0NJVrHjPnDqZMjdIq9cP87w4fk8KPk4XRNWAplUsUmKM+ eP5tPoBHvTbtGlGWktNbdFdXQOGuShUvK+LL1dO7dHYBjIAdwI4hoRi5Mgyajiw14see v1tbGsVpHdss2BtK3uGoHW+Mou4WPQxj943qJnHjU0ssjQkCn7pCx9AQJNTljlTUO+m7 EIUg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature :dkim-filter; bh=Rato3V56U1xIHpQYHOICTvOn543oqjGwizhO0Sk9Mt0=; fh=GIUGbiWNQYhJPZv9vYiOwxfdNrg5uuQG0eG5zS+rJAA=; b=qtivCOMOHYt8bTns+mg2cps2Mr7QS/gWALhA2M6Uf8c9PtogGfqIlxdDYpvQt3ckP2 Xlx4S6vNzjYIdQheby/ZUVIgoMTbt/l24BgYLmFGS/ztKj9/KVRJD8e9nOHue/pTyALo nPKfIaWLUV06W8Umvh7atR+4cdsALwa1rq1zZe4Kti+r8HW8d5MiVHm/RWg5yzhuAPKL gZDhk2HRkBRvDJlX6zb70httealvjZVKAI+IRIsagA1gS/Kg2GNi2VSGYabBMfR7/9GV C4PzifGmyOzWex+6SQAIhT9IVyJloq2aXp302Afs9JbRxR6FFG0X9a/harpuz236W1yS pY/g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=c5w6EmvN; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-109261-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109261-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id g14-20020ae9e10e000000b0078850338897si13770124qkm.195.2024.03.20.10.59.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 10:59:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-109261-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=c5w6EmvN; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-109261-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109261-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DC0361C20D85 for ; Wed, 20 Mar 2024 17:59:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 167196A35E; Wed, 20 Mar 2024 17:59:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="c5w6EmvN" Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 118961E49B; Wed, 20 Mar 2024 17:59:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710957566; cv=none; b=RJ87Sm8hF09QLSj0aHwxJjX9Q7sMiXXj005rz/GtA8fG8enNc8jP0yvn+SQAAFzsdvkpyJ1EKDlNwBVC/+utpEr83D86JeVcWlOFSi5hyJqhuV27VkTURMjPGV/gQsLRnOIG2zOTTz92jJ7zb5aD0FclO/CVFEnYooG/3OhJU18= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710957566; c=relaxed/simple; bh=hwiRKS8x3Dz/MZcnQGj74zkiU1VvC70pYcQb54qBPsY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=aJPsVPoo58LDkqLrY0YphBx29B9Wq5TXJKzGorOHzZRt0Ya8Y1U6b50DeaPTdwBWZBhzAbGdMAYrTLAO0wRiRTQfl6RUv4ez4EfpGG1nFqVuyQBrZLUAmi6OUV5L7oPX69wwp07asql5kJzLzgOL6Vi88RvJqavhw2LjS5Ts4sI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=c5w6EmvN; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Received: from [100.64.129.161] (unknown [20.29.225.195]) by linux.microsoft.com (Postfix) with ESMTPSA id 4C44C20B74C0; Wed, 20 Mar 2024 10:59:24 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4C44C20B74C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710957564; bh=Rato3V56U1xIHpQYHOICTvOn543oqjGwizhO0Sk9Mt0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=c5w6EmvN0GXhAmCwrWt1tnxPQ5dR3a5sHEY1FuqsmONSQeNaTf5VGgGVidSxKORE5 IMhT+F7RGSkDFquY1SPkN9dOnLdA/vbH9kakKUTqGOvpM/Tb7eRcm0QLmv9E/SFmln EYNRxQL6qS3JppOEVsgQw/ZqwKnjrm7kXZmVC1+8= Message-ID: <2c33751e-5995-4be2-a15e-ddca6a6ab4fe@linux.microsoft.com> Date: Wed, 20 Mar 2024 10:59:22 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4] hv/hv_kvp_daemon: Handle IPv4 and Ipv6 combination for keyfile format Content-Language: en-CA To: Shradha Gupta , linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org Cc: "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Long Li , Olaf Hering , Ani Sinha , Shradha Gupta References: <1710933451-6312-1-git-send-email-shradhagupta@linux.microsoft.com> From: Easwar Hariharan In-Reply-To: <1710933451-6312-1-git-send-email-shradhagupta@linux.microsoft.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/20/2024 4:17 AM, Shradha Gupta wrote: > If the network configuration strings are passed as a combination of IPv4 > and IPv6 addresses, the current KVP daemon does not handle processing for > the keyfile configuration format. > With these changes, the keyfile config generation logic scans through the > list twice to generate IPv4 and IPv6 sections for the configuration files > to handle this support. > > Testcases ran:Rhel 9, Hyper-V VMs > (IPv4 only, IPv6 only, IPv4 and IPv6 combination) > Signed-off-by: Shradha Gupta > --- > Changes in v4 > * Removed the unnecessary memset for addr in the start > * Added a comment to describe how we erase the last comma character > * Fixed some typos in the commit description > * While using strncat, skip copying the '\0' character. > --- > tools/hv/hv_kvp_daemon.c | 181 ++++++++++++++++++++++++++++++--------- > 1 file changed, 140 insertions(+), 41 deletions(-) > LGTM Reviewed-by: Easwar Hariharan - Easwar