/** @file\r
\r
-Copyright (c) 2005 - 2009, Intel Corporation.<BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>\r
+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
http://opensource.org/licenses/bsd-license.php\r
IP4_ROUTE_CACHE_ENTRY *CacheEntry;\r
IP4_INTERFACE *IpIf;\r
IP4_ADDR Gateway;\r
+ IP4_ADDR Src;\r
+ IP4_ADDR Dst;\r
\r
//\r
// Find the interface whose IP address is the source of the\r
continue;\r
}\r
\r
- CacheEntry = Ip4FindRouteCache (\r
- Ip4Instance->RouteTable,\r
- NTOHL (Icmp->IpHead.Dst),\r
- NTOHL (Icmp->IpHead.Src)\r
- );\r
+ Dst = NTOHL (Icmp->IpHead.Dst);\r
+ Src = NTOHL (Icmp->IpHead.Src);\r
+ CacheEntry = Ip4FindRouteCache (Ip4Instance->RouteTable, Dst, Src);\r
\r
//\r
// Only update the route cache's gateway if the source of the\r
}\r
\r
IP4_GET_CLIP_INFO (Packet)->Status = EFI_ICMP_ERROR;\r
- return Ip4Demultiplex (IpSb, Head, Packet);\r
+ return Ip4Demultiplex (IpSb, Head, Packet, NULL, 0);\r
}\r
\r
\r
// update is omitted.\r
//\r
Icmp = (IP4_ICMP_QUERY_HEAD *) NetbufGetByte (Data, 0, NULL);\r
+ ASSERT (Icmp != NULL);\r
Icmp->Head.Type = ICMP_ECHO_REPLY;\r
Icmp->Head.Checksum = 0;\r
Icmp->Head.Checksum = (UINT16) (~NetblockChecksum ((UINT8 *) Icmp, Data->TotalSize));\r
return Ip4IcmpReplyEcho (IpSb, Head, Packet);\r
}\r
\r
- return Ip4Demultiplex (IpSb, Head, Packet);\r
+ return Ip4Demultiplex (IpSb, Head, Packet, NULL, 0);\r
}\r
\r
\r