From nobody Mon Apr 29 03:44:15 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 14924004232691023.1808567527478; Sun, 16 Apr 2017 20:40:23 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E19A12193924A; Sun, 16 Apr 2017 20:40:20 -0700 (PDT) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 DF20C21A18AAA for ; Sun, 16 Apr 2017 20:40:19 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Apr 2017 20:40:19 -0700 Received: from jiaxinwu-mobl2.ccr.corp.intel.com ([10.239.196.63]) by orsmga003.jf.intel.com with ESMTP; 16 Apr 2017 20:40:17 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,210,1488873600"; d="scan'208";a="957674597" From: Jiaxin Wu To: edk2-devel@lists.01.org Date: Mon, 17 Apr 2017 11:40:16 +0800 Message-Id: <1492400416-11308-1-git-send-email-jiaxin.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 Subject: [edk2] [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: , Cc: RickF , Ye Ting , Fu Siyuan , Wu Jiaxin , Zhang Lubo MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" When PXE10/WFM11a offer received, we should only cache the first PXE10/WFM11a offer, and discard the others. But Current we discard all PXE10/WFM11a offer. 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 Reviewed-by: Ye Ting =20 --- NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c | 5 +++-- NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.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 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 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; --=20 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel