]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg: reset DHCP child when leaving PXE LoadFile.
authorFu Siyuan <siyuan.fu@intel.com>
Fri, 16 Oct 2015 07:18:38 +0000 (07:18 +0000)
committersfu5 <sfu5@Edk2>
Fri, 16 Oct 2015 07:18:38 +0000 (07:18 +0000)
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.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18615 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c

index 72923f1b38a4641aee6e6569995118c4c6303d69..89977e6690b91c5b612e59587c5de2f44edcecec 100644 (file)
@@ -2902,9 +2902,14 @@ EfiPxeLoadFile (
   //\r
   if (Status == EFI_SUCCESS) {\r
     //\r
+    // The DHCP4 can have only one configured child instance so we need to stop\r
+    // reset the DHCP4 child before we return. Otherwise the other programs which \r
+    // also need to use DHCP4 will be impacted.\r
     // The functionality of PXE Base Code protocol will not be stopped,\r
     // when downloading is successfully.\r
     //\r
+    Private->Dhcp4->Stop (Private->Dhcp4);\r
+    Private->Dhcp4->Configure (Private->Dhcp4, NULL);\r
     return EFI_SUCCESS;\r
 \r
   } else if (Status == EFI_BUFFER_TOO_SMALL) {\r