summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFu Siyuan <siyuan.fu@intel.com>2015-11-16 07:17:05 +0000
committervanjeff <vanjeff@Edk2>2015-11-16 07:17:05 +0000
commitcea2d2433b50493cb05bac564987f851141d5aa3 (patch)
tree6705fa3a0fe15ed1e0c7c46d6f0e8ce9234af9ff
parentb5cf1b799efb64e59218333a5ae44b47a0f26876 (diff)
downloadedk2-platforms-cea2d2433b50493cb05bac564987f851141d5aa3.tar.xz
NetworkPkg: reset DHCP child when leaving PXE LoadFile.
The DHCP4 can have only one configured child instance so we need to reset the DHCP4 child when leaving PXE driver's LoadFile() function, otherwise the other programs which also need to use DHCP4 (like HTTP boot) will be impacted. (Sync patch r18616 from main trunk.) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Sriram Subramanian <sriram-s@hpe.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2015@18800 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c
index 367a1356ab..12e5566a79 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c
@@ -2392,6 +2392,16 @@ EfiPxeLoadFile (
// 3. unsupported.
//
PxeBc->Stop (PxeBc);
+ } else {
+ //
+ // The DHCP4 can have only one configured child instance so we need to stop
+ // reset the DHCP4 child before we return. Otherwise these programs which
+ // also need to use DHCP4 will be impacted.
+ //
+ if (!PxeBc->Mode->UsingIpv6) {
+ Private->Dhcp4->Stop (Private->Dhcp4);
+ Private->Dhcp4->Configure (Private->Dhcp4, NULL);
+ }
}
return Status;