diff options
author | Jiaxin Wu <jiaxin.wu@intel.com> | 2017-12-12 11:02:47 +0800 |
---|---|---|
committer | Jiaxin Wu <jiaxin.wu@intel.com> | 2017-12-15 08:46:31 +0800 |
commit | 10e6244236c17548e263c1eaa28d3da266e4a2dd (patch) | |
tree | 0f3a74248bd06da24231d83032594a1cee30fa7c /NetworkPkg/UefiPxeBcDxe | |
parent | 1cf2410047f573a81daed28ed425eef54f18bf64 (diff) | |
download | edk2-10e6244236c17548e263c1eaa28d3da266e4a2dd.tar.gz edk2-10e6244236c17548e263c1eaa28d3da266e4a2dd.tar.bz2 edk2-10e6244236c17548e263c1eaa28d3da266e4a2dd.zip |
NetworkPkg/UefiPxeBcDxe: Fix Pxe.Dhcp() return status code.
According UEFI Spec, if valid PXE offer is not received, Pxe.Dhcp()
should return EFI_NO_RESPONSE, but currently, EFI_TIMEOUT is returned
from Pxe.Dhcp().
This patch is to fix the above issue.
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Diffstat (limited to 'NetworkPkg/UefiPxeBcDxe')
-rw-r--r-- | NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c | 2 | ||||
-rw-r--r-- | NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c b/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c index fc50a82959..0bb1d661e5 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c @@ -1242,7 +1242,7 @@ ON_EXIT: } else if (Status == EFI_NO_MEDIA) {
AsciiPrint ("\n PXE-E12: Could not detect network connection.\n");
} else if (Status == EFI_NO_RESPONSE) {
- AsciiPrint ("\n PXE-E16: No offer received.\n");
+ AsciiPrint ("\n PXE-E16: No valid offer received.\n");
} else if (Status == EFI_TIMEOUT) {
AsciiPrint ("\n PXE-E18: Server response timeout.\n");
} else if (Status == EFI_ABORTED) {
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c index 97829e9842..101c65824a 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c @@ -1707,6 +1707,11 @@ PxeBcDhcp4Dora ( if (Status == EFI_ICMP_ERROR) {
PxeMode->IcmpErrorReceived = TRUE;
}
+
+ if (Status == EFI_TIMEOUT && Private->OfferNum > 0) {
+ Status = EFI_NO_RESPONSE;
+ }
+
goto ON_EXIT;
}
|