]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
MdeModulePkg: Fix the issue cannot boot to UEFI Network after reset
[mirror_edk2.git] / MdeModulePkg / Universal / Network / UefiPxeBcDxe / PxeBcImpl.c
index 0c54f46516ac8134ddd37e1ad10bd0b5a63e9840..4dd7944e6a9a94abda5031ff7c067c6ba057a96a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Interface routines for PxeBc.\r
 \r
-Copyright (c) 2007 - 2013, 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -410,6 +410,18 @@ EfiPxeBcStart (
     goto ON_EXIT;\r
   }\r
 \r
+  //\r
+  //DHCP4 service allows only one of its children to be configured in  \r
+  //the active state, If the DHCP4 D.O.R.A started by IP4 auto  \r
+  //configuration and has not been completed, the Dhcp4 state machine \r
+  //will not be in the right state for the PXE to start a new round D.O.R.A. \r
+  //so we need to switch it's policy to static.\r
+  //\r
+  Status = PxeBcSetIp4Policy (Private);\r
+  if (EFI_ERROR (Status)) {\r
+    goto ON_EXIT;\r
+  }\r
+    \r
   Status = Private->Ip4->Configure (Private->Ip4, &Private->Ip4ConfigData);\r
   if (EFI_ERROR (Status)) {\r
     goto ON_EXIT;\r