From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id EA1F5740034 for ; Tue, 13 Feb 2024 20:17:01 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=H2Q282ysm38YvH3QMqsTVHKROeNba1E1V4Q68DlxU70=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent:Subject:To:CC:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1707855420; v=1; b=EgXq09bE1pNLpvr2dcrQQgrew9Fw0k+upE/TuC2iC2YbXhLYGA5+senMoRLqovx54lnPnuG0 U4r8qN/k6KxdYUjj7d+be8CHHE26hgTVXzlNJWe51ByIBgs+EuzmjWvQxkyw9csVyf6IZdbueWK c9ObIYcbjmjLrm4AtdlF8X0c= X-Received: by 127.0.0.2 with SMTP id AfTVYY7687511xGHqGFJVAOX; Tue, 13 Feb 2024 12:17:00 -0800 X-Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web10.23860.1707855420005506964 for ; Tue, 13 Feb 2024 12:17:00 -0800 X-Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41DGw9Lc007279; Tue, 13 Feb 2024 20:16:59 GMT X-Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3w7gse3wka-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Feb 2024 20:16:59 +0000 (GMT) X-Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41DKGwxn030539 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Feb 2024 20:16:58 GMT X-Received: from [10.111.132.144] (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 13 Feb 2024 12:16:57 -0800 Message-ID: Date: Tue, 13 Feb 2024 20:16:54 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH v2 3/4] NetworkPkg: Dhcp6Dxe: Packet-Length is not updated before appending To: , CC: Saloni Kasbekar , Zachary Clark-williams , "Doug Flick [MSFT]" , "Kinney, Michael D" References: <20240213184603.2985-1-doug.edk2@gmail.com> <20240213184603.2985-4-doug.edk2@gmail.com> From: "Leif Lindholm" In-Reply-To: <20240213184603.2985-4-doug.edk2@gmail.com> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-GUID: e2M4M_KqWFAm1SgRs4BlrSdq2j--fnHs X-Proofpoint-ORIG-GUID: e2M4M_KqWFAm1SgRs4BlrSdq2j--fnHs Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,quic_llindhol@quicinc.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: cGQByUrqX5EmrBle3FyPWPn4x7686176AA= Content-Language: en-GB Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=EgXq09bE; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=quicinc.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On 2024-02-13 18:46, Doug Flick via groups.io wrote: > From: Doug Flick >=20 > In order for Dhcp6AppendIaAddrOption (..) to safely append the IA > Address option, the Packet-Length field must be updated before appending > the option. >=20 > Cc: Saloni Kasbekar > Cc: Zachary Clark-williams >=20 > Signed-off-by: Doug Flick [MSFT] Reviewed-by: Leif Lindholm Thanks for this! > --- > NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) >=20 > diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c b/NetworkPkg/Dhcp6Dxe/Dhc= p6Utility.c > index e4e072562296..f38e3ee3fe1a 100644 > --- a/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c > +++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c > @@ -924,6 +924,11 @@ Dhcp6AppendIaOption ( > *PacketCursor +=3D sizeof (T2); >=20 > } >=20 > =20 >=20 > + // >=20 > + // Update the packet length >=20 > + // >=20 > + Packet->Length +=3D BytesNeeded; >=20 > + >=20 > // >=20 > // Fill all the addresses belong to the Ia >=20 > // >=20 > @@ -935,11 +940,6 @@ Dhcp6AppendIaOption ( > } >=20 > } >=20 > =20 >=20 > - // >=20 > - // Update the packet length >=20 > - // >=20 > - Packet->Length +=3D BytesNeeded; >=20 > - >=20 > // >=20 > // Fill the value of Ia option length >=20 > // >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115413): https://edk2.groups.io/g/devel/message/115413 Mute This Topic: https://groups.io/mt/104339708/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-