]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fixed a bug in Ip4HandleIcmpError, it should pass over the whole ICMP error message...
authortye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 25 Jan 2010 03:07:49 +0000 (03:07 +0000)
committertye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 25 Jan 2010 03:07:49 +0000 (03:07 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9800 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c

index 03297aa26c1dbcd9d690c3d5d7fbd2eeeaa2f0b8..1eaed05264f658c4090073119b41926ee8a64d9a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   IP4 input process.\r
   \r
-Copyright (c) 2005 - 2009, Intel Corporation.<BR>\r
+Copyright (c) 2005 - 2010, Intel Corporation.<BR>\r
 All rights reserved. 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
@@ -881,11 +881,11 @@ Ip4InstanceFrameAcceptable (
   //\r
   // Use protocol from the IP header embedded in the ICMP error\r
   // message to filter, instead of ICMP itself. ICMP handle will\r
-  // can Ip4Demultiplex to deliver ICMP errors.\r
+  // call Ip4Demultiplex to deliver ICMP errors.\r
   //\r
   Proto = Head->Protocol;\r
 \r
-  if (Proto == EFI_IP_PROTO_ICMP) {\r
+  if ((Proto == EFI_IP_PROTO_ICMP) && (!Config->AcceptAnyProtocol) && (Proto != Config->DefaultProtocol)) {\r
     NetbufCopy (Packet, 0, sizeof (Icmp.Head), (UINT8 *) &Icmp.Head);\r
 \r
     if (mIcmpClass[Icmp.Head.Type].IcmpClass == ICMP_ERROR_MESSAGE) {\r