From 129b8b096fa2f87a4b24f31c004dea7bfe7872dd Mon Sep 17 00:00:00 2001 From: hhuan13 Date: Fri, 12 Aug 2011 06:18:29 +0000 Subject: 1. Fix bugs for PXE-IPv6 to accommodate the situation: 1.1 Proxy DHCP6 service and DHCP6 service on different servers. 1.2 Proxy DHCP6 server with Response Delay setting. 2. Update to support percent-encoding in NBP file name in netboot6 BootFileURL. Signed-off-by: hhuan13 Reviewed-by: xdu2, tye git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12122 6f19259b-4bc3-4df7-8a09-765794883524 --- NetworkPkg/Ip6Dxe/Ip6Output.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'NetworkPkg/Ip6Dxe') diff --git a/NetworkPkg/Ip6Dxe/Ip6Output.c b/NetworkPkg/Ip6Dxe/Ip6Output.c index ecbaf2d..0e18c10 100644 --- a/NetworkPkg/Ip6Dxe/Ip6Output.c +++ b/NetworkPkg/Ip6Dxe/Ip6Output.c @@ -1,7 +1,7 @@ /** @file The internal functions and routines to transmit the IP6 packet. - Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -689,13 +689,25 @@ Ip6Output ( // For unicast packets, use a combination of the Destination Cache, the Prefix List // and the Default Router List to determine the IP address of the appropriate next hop. // - RouteCache = Ip6Route (IpSb, &Head->DestinationAddress, &Head->SourceAddress); - if (RouteCache == NULL) { - return EFI_NOT_FOUND; - } - IP6_COPY_ADDRESS (&NextHop, &RouteCache->NextHop); - Ip6FreeRouteCacheEntry (RouteCache); + NeighborCache = Ip6FindNeighborEntry (IpSb, &Head->DestinationAddress); + if (NeighborCache != NULL) { + // + // Hit Neighbor Cache. + // + IP6_COPY_ADDRESS (&NextHop, &Head->DestinationAddress); + } else { + // + // Not in Neighbor Cache, check Router cache + // + RouteCache = Ip6Route (IpSb, &Head->DestinationAddress, &Head->SourceAddress); + if (RouteCache == NULL) { + return EFI_NOT_FOUND; + } + + IP6_COPY_ADDRESS (&NextHop, &RouteCache->NextHop); + Ip6FreeRouteCacheEntry (RouteCache); + } } // -- cgit v1.1