diff options
author | hhuan13 <hhuan13@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-08-24 08:53:22 +0000 |
---|---|---|
committer | hhuan13 <hhuan13@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-08-24 08:53:22 +0000 |
commit | 4496ff751f7843fbbedf91f1a58212eb7c9a1ca8 (patch) | |
tree | 2b960fd5619b4d347bdf22b0cc0a08d924dd8f5a /NetworkPkg/UefiPxeBcDxe | |
parent | 379db4ac175dccb7d4fcaed3dabd9cada453fbe0 (diff) | |
download | edk2-platforms-4496ff751f7843fbbedf91f1a58212eb7c9a1ca8.tar.xz |
1. Refine the error handling when the PXE-v4 DHCP offer isn't valid
Signed-off-by: hhuan13
Reviewed-by: xdu2
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12192 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'NetworkPkg/UefiPxeBcDxe')
-rw-r--r-- | NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c | 2 | ||||
-rw-r--r-- | NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c | 5 | ||||
-rw-r--r-- | NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c b/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c index d58e2b46c2..e26b412781 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c @@ -1164,6 +1164,8 @@ ON_EXIT: AsciiPrint ("\n PXE-E22: Client received ICMP error from server.\n");
} else if (Status == EFI_TFTP_ERROR) {
AsciiPrint ("\n PXE-E23: Client received TFTP error from server.\n");
+ } else if (Status == EFI_NOT_FOUND) {
+ AsciiPrint ("\n PXE-E53: No boot filename received.\n");
} else if (Status != EFI_BUFFER_TOO_SMALL) {
AsciiPrint ("\n PXE-E99: Unexpected network error.\n");
}
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c index a30ae177ef..60942fb908 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c @@ -960,6 +960,7 @@ PxeBcSelectDhcp4Offer ( @retval EFI_SUCCESS Handled the DHCPv4 offer packet successfully.
@retval EFI_NO_RESPONSE No response to the following request packet.
+ @retval EFI_NOT_FOUND No boot filename received.
**/
EFI_STATUS
@@ -1070,7 +1071,9 @@ PxeBcHandleDhcp4Offer ( //
// Othewise, the bootfile name must be included in DhcpOnly offer.
//
- ASSERT (Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE] != NULL);
+ if (Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE] == NULL) {
+ Status = EFI_NOT_FOUND;
+ }
}
}
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c index 8e1e91cb65..82fddb169a 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c @@ -388,6 +388,8 @@ EfiPxeBcDhcp ( Mode->IcmpErrorReceived = FALSE;
Private->Function = EFI_PXE_BASE_CODE_FUNCTION_DHCP;
Private->IsOfferSorted = SortOffers;
+ Private->SolicitTimes = 0;
+ Private->ElapsedTime = 0;
if (!Mode->Started) {
return EFI_NOT_STARTED;
|