From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7B2C020D7A3C8 for ; Mon, 17 Apr 2017 01:29:07 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Apr 2017 01:29:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,214,1488873600"; d="scan'208";a="90338632" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga005.fm.intel.com with ESMTP; 17 Apr 2017 01:29:06 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 17 Apr 2017 01:29:06 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 17 Apr 2017 01:29:06 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.117]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.193]) with mapi id 14.03.0319.002; Mon, 17 Apr 2017 16:29:04 +0800 From: "Ye, Ting" To: "Wu, Jiaxin" , "edk2-devel@lists.01.org" CC: RickF , "Fu, Siyuan" , "Zhang, Lubo" Thread-Topic: [Patch] NetworkPkg: Correct the proxy DHCP offer handing Thread-Index: AQHStyxdpKPYdbDJGEqwEysrzfpNR6HJOu5A Date: Mon, 17 Apr 2017 08:29:03 +0000 Message-ID: References: <1492400416-11308-1-git-send-email-jiaxin.wu@intel.com> In-Reply-To: <1492400416-11308-1-git-send-email-jiaxin.wu@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] NetworkPkg: Correct the proxy DHCP offer handing X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2017 08:29:07 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ye Ting =20 -----Original Message----- From: Wu, Jiaxin=20 Sent: Monday, April 17, 2017 11:40 AM To: edk2-devel@lists.01.org Cc: RickF ; Ye, Ting ; Fu, Siyua= n ; Zhang, Lubo ; Wu, Jiaxin Subject: [Patch] NetworkPkg: Correct the proxy DHCP offer handing When PXE10/WFM11a offer received, we should only cache the first PXE10/WFM1= 1a offer, and discard the others. But Current we discard all PXE10/WFM11a o= ffer. This patch is to fix this issue. Cc: RickF Cc: Ye Ting Cc: Fu Siyuan Cc: Zhang Lubo Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin --- NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c | 5 +++-- NetworkPkg/UefiPxeBcDxe/Px= eBcDhcp6.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c b/NetworkPkg/UefiPxeBcDxe= /PxeBcDhcp4.c index 5497390..97829e9 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c @@ -1,9 +1,9 @@ /** @file Functions implementation related with DHCPv4 for UefiPxeBc Driver. =20 - Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2017, Intel Corporation. All rights=20 + reserved.
=20 This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the license may b= e found at http://opensource.org/licenses/bsd-license.php. @@ -868,11 +868,12 @@ PxeBcCacheDhcp4Offer ( // // Cache all proxy BINL offers. // Private->OfferIndex[OfferType][Private->OfferCount[OfferType]] =3D= Private->OfferNum; Private->OfferCount[OfferType]++; - } else if (Private->OfferCount[OfferType] > 0) { + } else if ((OfferType =3D=3D PxeOfferTypeProxyPxe10 || OfferType =3D= =3D PxeOfferTypeProxyWfm11a) &&=20 + Private->OfferCount[OfferType] < 1) { // // Only cache the first PXE10/WFM11a offer, and discard the others= . // Private->OfferIndex[OfferType][0] =3D Private->OfferNum; Private->OfferCount[OfferType] =3D 1; diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c b/NetworkPkg/UefiPxeBcDxe= /PxeBcDhcp6.c index a295b82..4cd1770 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c @@ -1,10 +1,10 @@ /** @file Functions implementation related with DHCPv6 for UefiPxeBc Driver. =20 (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
- Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2017, Intel Corporation. All rights=20 + reserved.
=20 This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the license may b= e found at http://opensource.org/licenses/bsd-license.php. @@ -1195,11 +1195,12 @@ PxeBcCacheDhcp6Offer ( // // Cache all proxy BINL offers. // Private->OfferIndex[OfferType][Private->OfferCount[OfferType]] =3D P= rivate->OfferNum; Private->OfferCount[OfferType]++; - } else if (Private->OfferCount[OfferType] > 0) { + } else if ((OfferType =3D=3D PxeOfferTypeProxyPxe10 || OfferType =3D= =3D PxeOfferTypeProxyWfm11a) &&=20 + Private->OfferCount[OfferType] < 1) { // // Only cache the first PXE10/WFM11a offer, and discard the others. // Private->OfferIndex[OfferType][0] =3D Private->OfferNum; Private->OfferCount[OfferType] =3D 1; -- 1.9.5.msysgit.1