]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Ip6Dxe/Ip6Route.c
NetworkPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / NetworkPkg / Ip6Dxe / Ip6Route.c
index bba365c15226fac173e59fa4ad05ad33fe9def81..c8d79cd6dbcc3de1e6d89cc498e5e351d4dee0a7 100644 (file)
@@ -1,15 +1,9 @@
 /** @file\r
   The functions and routines to handle the route caches and route table.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
 \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
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -135,7 +129,7 @@ Ip6FindRouteEntry (
 \r
   RtEntry = NULL;\r
 \r
-  for (Index = IP6_PREFIX_NUM - 1; Index >= 0; Index--) {\r
+  for (Index = IP6_PREFIX_MAX; Index >= 0; Index--) {\r
     NET_LIST_FOR_EACH (Entry, &RtTable->RouteArea[Index]) {\r
       RtEntry = NET_LIST_USER_STRUCT (Entry, IP6_ROUTE_ENTRY, Link);\r
 \r
@@ -300,7 +294,7 @@ Ip6BuildEfiRouteTable (
   //\r
   Count = 0;\r
 \r
-  for (Index = IP6_PREFIX_NUM - 1; Index >= 0; Index--) {\r
+  for (Index = IP6_PREFIX_MAX; Index >= 0; Index--) {\r
 \r
     NET_LIST_FOR_EACH (Entry, &(RouteTable->RouteArea[Index])) {\r
       RtEntry = NET_LIST_USER_STRUCT (Entry, IP6_ROUTE_ENTRY, Link);\r
@@ -346,7 +340,7 @@ Ip6CreateRouteTable (
   RtTable->RefCnt   = 1;\r
   RtTable->TotalNum = 0;\r
 \r
-  for (Index = 0; Index < IP6_PREFIX_NUM; Index++) {\r
+  for (Index = 0; Index <= IP6_PREFIX_MAX; Index++) {\r
     InitializeListHead (&RtTable->RouteArea[Index]);\r
   }\r
 \r
@@ -385,7 +379,7 @@ Ip6CleanRouteTable (
   //\r
   // Free all the route table entry and its route cache.\r
   //\r
-  for (Index = 0; Index < IP6_PREFIX_NUM; Index++) {\r
+  for (Index = 0; Index <= IP6_PREFIX_MAX; Index++) {\r
     NET_LIST_FOR_EACH_SAFE (Entry, Next, &RtTable->RouteArea[Index]) {\r
       RtEntry = NET_LIST_USER_STRUCT (Entry, IP6_ROUTE_ENTRY, Link);\r
       RemoveEntryList (Entry);\r