]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c
Rename Trusted Hob to Measured FV hob and add Guided Hob layout structure
[mirror_edk2.git] / NetworkPkg / UefiPxeBcDxe / PxeBcDhcp4.c
index 08415d97b421583d57263e50d919cc8dcce0e993..ecafc86a038780e2e7ac95e6cb7978fe17593dad 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Functions implementation related with DHCPv4 for UefiPxeBc Driver.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -316,7 +316,7 @@ PxeBcBuildDhcp4Options (
   Index++;\r
   OptList[Index]          = GET_NEXT_DHCP_OPTION (OptList[Index - 1]);\r
 \r
-  if (EFI_ERROR (PxeBcGetSystemGuid ((EFI_GUID *) OptEnt.Uuid->Guid))) {\r
+  if (EFI_ERROR (NetLibGetSystemGuid ((EFI_GUID *) OptEnt.Uuid->Guid))) {\r
     //\r
     // Zero the Guid to indicate NOT programable if failed to get system Guid.\r
     //\r
@@ -960,6 +960,7 @@ PxeBcSelectDhcp4Offer (
 \r
   @retval     EFI_SUCCESS         Handled the DHCPv4 offer packet successfully.\r
   @retval     EFI_NO_RESPONSE     No response to the following request packet.\r
+  @retval     EFI_NOT_FOUND       No boot filename received.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1070,7 +1071,9 @@ PxeBcHandleDhcp4Offer (
       //\r
       //  Othewise, the bootfile name must be included in DhcpOnly offer.\r
       //\r
-      ASSERT (Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE] != NULL);\r
+      if (Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE] == NULL) {\r
+        Status = EFI_NOT_FOUND;\r
+      }\r
     }\r
   }\r
 \r
@@ -1193,7 +1196,7 @@ PxeBcDhcp4CallBack (
       //\r
       // Send the system Guid instead of the MAC address as the hardware address if required.\r
       //\r
-      if (EFI_ERROR (PxeBcGetSystemGuid ((EFI_GUID *) Packet->Dhcp4.Header.ClientHwAddr))) {\r
+      if (EFI_ERROR (NetLibGetSystemGuid ((EFI_GUID *) Packet->Dhcp4.Header.ClientHwAddr))) {\r
         //\r
         // Zero the Guid to indicate NOT programable if failed to get system Guid.\r
         //\r
@@ -1369,7 +1372,7 @@ PxeBcDhcp4Discover (
   }\r
 \r
   if (Mode->SendGUID) {\r
-    if (EFI_ERROR (PxeBcGetSystemGuid ((EFI_GUID *) Token.Packet->Dhcp4.Header.ClientHwAddr))) {\r
+    if (EFI_ERROR (NetLibGetSystemGuid ((EFI_GUID *) Token.Packet->Dhcp4.Header.ClientHwAddr))) {\r
       //\r
       // Zero the Guid to indicate NOT programable if failed to get system Guid.\r
       //\r
@@ -1440,7 +1443,7 @@ PxeBcDhcp4Discover (
           break;\r
         }\r
         if ((SrvList[SrvIndex].Type == Type) &&\r
-            EFI_IP4_EQUAL (&Response->Dhcp4.Header.ServerAddr, &Private->ServerIp)) {\r
+            EFI_IP4_EQUAL (&Response->Dhcp4.Header.ServerAddr, &SrvList[SrvIndex].IpAddr)) {\r
           break;\r
         }\r
         SrvIndex++;\r
@@ -1584,6 +1587,7 @@ PxeBcDhcp4Dora (
   AsciiPrint ("\n  Station IP address is ");\r
 \r
   PxeBcShowIp4Addr (&Private->StationIp.v4);\r
+  AsciiPrint ("\n");\r
 \r
 ON_EXIT:\r
   if (EFI_ERROR (Status)) {\r