summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c5
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c
index 5497390119..97829e9842 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c
@@ -1,7 +1,7 @@
/** @file
Functions implementation related with DHCPv4 for UefiPxeBc Driver.
- Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -870,7 +870,8 @@ PxeBcCacheDhcp4Offer (
//
Private->OfferIndex[OfferType][Private->OfferCount[OfferType]] = Private->OfferNum;
Private->OfferCount[OfferType]++;
- } else if (Private->OfferCount[OfferType] > 0) {
+ } else if ((OfferType == PxeOfferTypeProxyPxe10 || OfferType == PxeOfferTypeProxyWfm11a) &&
+ Private->OfferCount[OfferType] < 1) {
//
// Only cache the first PXE10/WFM11a offer, and discard the others.
//
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
index a295b827af..4cd1770750 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
@@ -2,7 +2,7 @@
Functions implementation related with DHCPv6 for UefiPxeBc Driver.
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
- Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -1197,7 +1197,8 @@ PxeBcCacheDhcp6Offer (
//
Private->OfferIndex[OfferType][Private->OfferCount[OfferType]] = Private->OfferNum;
Private->OfferCount[OfferType]++;
- } else if (Private->OfferCount[OfferType] > 0) {
+ } else if ((OfferType == PxeOfferTypeProxyPxe10 || OfferType == PxeOfferTypeProxyWfm11a) &&
+ Private->OfferCount[OfferType] < 1) {
//
// Only cache the first PXE10/WFM11a offer, and discard the others.
//