]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c
NetworkPkg: reset DHCP child when leaving PXE LoadFile.
[mirror_edk2.git] / NetworkPkg / UefiPxeBcDxe / PxeBcImpl.c
index 367a1356abccaa0cfaff5e17296f60ade2d9fae3..12e5566a7913b1804551f69b23c970935758c0c0 100644 (file)
@@ -2392,6 +2392,16 @@ EfiPxeLoadFile (
     //   3. unsupported.\r
     //\r
     PxeBc->Stop (PxeBc);\r
+  } else {\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 these programs which \r
+    // also need to use DHCP4 will be impacted.\r
+    //\r
+    if (!PxeBc->Mode->UsingIpv6) {\r
+      Private->Dhcp4->Stop (Private->Dhcp4);\r
+      Private->Dhcp4->Configure (Private->Dhcp4, NULL);\r
+    }\r
   }\r
 \r
   return Status;\r