Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp384374lqt; Mon, 18 Mar 2024 10:29:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWuYLz963lg55dkJi3X8fS/vAbPyypnpI7V8IymBXFW+ZnDKpo3YvyE5xfz73cPJ05ziSMsLmOIZ9KxGVLkyclaMPYU+en633DinRi9iw== X-Google-Smtp-Source: AGHT+IEDBc0BUw8R6F0BedC+wvni8eJmv1Lg7ap3OwIfzNuSc7najT+PMp22u2reobSxaEeLzT5v X-Received: by 2002:a17:906:b245:b0:a46:be1a:46d9 with SMTP id ce5-20020a170906b24500b00a46be1a46d9mr2443410ejb.15.1710782955750; Mon, 18 Mar 2024 10:29:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710782955; cv=pass; d=google.com; s=arc-20160816; b=wZbOgsUSYWcA9e+4no4ejaPJsE6FVj+PAuP4H9bb4yRCNeEhYKzU9Km2oBVauHEq4n NJ2GkKquhMHSyECQ8sK/Cqd+J12NvdziR5K0BlmEyXU6u2H8ewXUtPIoIxspj7jOPC1T 9Ep6ALMI7WwNmslxFBO94zUROo3jcK68iMvD8L06KLmlf7xiA3/BR/JkwQ3rnFqmZG7v 9yYsbZjyZMSKXddOY45QnADn0PGEHBe1PCcj4B5iCmsohNYcFQqNMv68SoDBUfVMtApB zMEoDkWP3U5QH4ggd7JuZ53taTgNWUB/8VpA6DpeBDQ7qqYdRCe6yK+azIF3jmKwrK5j Vu4Q== 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=oBaGphn3sgS15rqtIpRpiQQCVintTQGUoEgffbht8jc=; fh=WlgLvIZt2yAX9Dh8jUSuEuW4ohys1voSYuI1dmstN8k=; b=qlXaxgyxluLHbR5WaZDpfGO4kU1B0VWTyyBTkJb3+76LIOe02btTYp7O1u/U8qz+8y x9qs+5otBlg6yKo6Ex8QJDC9jtag2ZCxYGOJCCBkUpZfIC3akjq1pYhzLvR1j0r11dbg dKVXVAsi5YdfD0kzlpZ4to+7pW0pDVjHj6sfEix51UUjCYO7qR9VaITPeisAU0294lm4 HIIXlbGib2iwIuvhB14oTBbR9ftCcdfjie2yAtr6T2BHvQvu++QqUiTrOlR5ZPeFITKX 8CRdutRGSSdr4dOUYvT/W1Dh1Gy+7V0Y6HFUaKaED8tabr4xUl3IjiXApJu/Ywof4D2n NrDQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=h1pfMRex; 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-106432-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106432-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 am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id pv27-20020a170907209b00b00a464809f42bsi4593156ejb.531.2024.03.18.10.29.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 10:29:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106432-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=h1pfMRex; 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-106432-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106432-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 am.mirrors.kernel.org (Postfix) with ESMTPS id CE0E11F23B73 for ; Mon, 18 Mar 2024 17:17:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B7D6255C11; Mon, 18 Mar 2024 17:17:03 +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="h1pfMRex" Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C88855790; Mon, 18 Mar 2024 17:17:01 +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=1710782222; cv=none; b=P3S7Bww4V/Vg11L8YelIsvC/RR4EmG9D9x2/sNDFQMAZAYuQxjebcC+xg05eiVx68512l18usjIv6Z414B8yiLW/TleQuBiPPMfDUbppucyMzMmZSC/JYzipl/AyqoNRQcc6cpB7Ff+LJhem/43uwTVM6ykcP/3ARFRacJh8nqE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710782222; c=relaxed/simple; bh=vDTqZKYF8IvJ3DljVKzXoNPrU7o1alGyUizdeOTNDuA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=GGoHgM7r4F5pUjP3R/IOsGp1OLe+M2h2CGqglQaNkutNRFIpCWwQmHe6t/0xm+w63mOEKm+P/+Xd1VVFTAvCTHxI0WivTfWvqSpv699QZ/bEnrlBuKVAKQ6JRC7J/XZYJcmcs8jY6AQPYia3DXtvJCW7ZOcpl21ZQHxjvLtTawg= 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=h1pfMRex; 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.232.101] (unknown [20.29.225.195]) by linux.microsoft.com (Postfix) with ESMTPSA id BB2E920B74C0; Mon, 18 Mar 2024 10:17:00 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com BB2E920B74C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710782221; bh=oBaGphn3sgS15rqtIpRpiQQCVintTQGUoEgffbht8jc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=h1pfMRex9JeFAIpEfLqo3Ru1rw8Fd+cuLioiO2U87gharO5NtItLjy89I4sXiZUl0 R58UuKXNooldgmFppgYSRNO+Dm3a803YuBiW8zm/gd0MuNSYE2rvM6tNnlOIaZfSVG r3rMFReXC7MIVCvXlg54AqeGpJKrMac3Q4Efu17c= Message-ID: <066c4b0c-c8a5-4abd-9456-20b0352ee1ab@linux.microsoft.com> Date: Mon, 18 Mar 2024 10:16:59 -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 v3] hv/hv_kvp_daemon: Handle IPv4 and Ipv6 combination for keyfile format Content-Language: en-CA To: Ani Sinha Cc: Shradha Gupta , linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Long Li , Olaf Hering , Shradha Gupta References: <1710729951-2695-1-git-send-email-shradhagupta@linux.microsoft.com> <9d24633d-b2bf-4cbe-86f7-6df56ba14657@linux.microsoft.com> From: Easwar Hariharan In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 3/18/2024 10:12 AM, Ani Sinha wrote: > > >>> + } >>> + >>> + if (strlen(output_str)) { >>> + output_str[strlen(output_str) - 1] = '\0'; >> >> You don't need this since you're using strncat which adds its own '\0'. > > If I understand this correctly, this code simply eliminates the extra “,” character in the end. Therefore it is needed. > Since it is not obvious, in the previous review and before, I asked the author to add a comment to explain this clearly. > >> I wasn't quite able to follow along >> on the discussion between Ani and you, so putting this in here in case it wasn't already mentioned. >> Ah, great, that makes sense. I did see that it was destroying data but didn't spend enough time to think through what data it was destroying, and if that was a feature or a bug. Thanks for calling it out! - Easwar