]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
MdeModulePkg: reset DHCP child when leaving PXE LoadFile.
[mirror_edk2.git] / 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