]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
MdeModulePkg/UefiPxeBcDxe: Discard the normal ICMP packets and recycle the received...
[mirror_edk2.git] / MdeModulePkg / Universal / Network / UefiPxeBcDxe / PxeBcImpl.c
index 6d4f33f0dbaef59d5e578fb64d422e6445202c07..4bfeaf3d31754021076665d4f05219361eb78199 100644 (file)
@@ -166,13 +166,15 @@ IcmpErrorListenHandlerDpc (
     return;\r
   }\r
 \r
-  if (EFI_ERROR (Status) || (RxData == NULL)) {\r
+  if (RxData == NULL) {\r
+    goto Resume;\r
+  }\r
+\r
+  if (Status != EFI_ICMP_ERROR) {\r
     //\r
-    // Only process the normal packets and the icmp error packets, if RxData is NULL\r
-    // with Status == EFI_SUCCESS or EFI_ICMP_ERROR, just resume the receive although\r
-    // this should be a bug of the low layer (IP).\r
+    // The return status should be recognized as EFI_ICMP_ERROR.\r
     //\r
-    goto Resume;\r
+    goto CleanUp;\r
   }\r
 \r
   if (EFI_IP4 (RxData->Header->SourceAddress) != 0 &&\r
@@ -216,8 +218,6 @@ IcmpErrorListenHandlerDpc (
     CopiedPointer += CopiedLen;\r
   }\r
 \r
-  goto Resume;\r
-\r
 CleanUp:\r
   gBS->SignalEvent (RxData->RecycleSignal);\r
 \r