Reviewed-by: Sriram Subramanian <[email protected]>

-----Original Message-----
From: Fu Siyuan [mailto:[email protected]] 
Sent: Thursday, October 15, 2015 11:36 AM
To: [email protected]
Cc: [email protected]; Subramanian, Sriram (System FW, HP Servers)
Subject: [Patch 1/2] 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.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <[email protected]>
---
 NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c 
b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c
index 367a135..12e5566 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;
--
2.5.0.windows.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to