]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Ip6Dxe/Ip6Nd.c
NetworkPkg: Add new macros and refine codes
[mirror_edk2.git] / NetworkPkg / Ip6Dxe / Ip6Nd.c
index 2c8be42f093f63e0961f62d3a0aa0c9930b567cc..be3dd911b6c5cf0b025d83f4e153eaa9709bd04c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation of Neighbor Discovery support routines.\r
 \r
-  Copyright (c) 2009 - 2012, 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
@@ -198,7 +198,7 @@ Ip6CreatePrefixListEntry (
   LIST_ENTRY                *Entry;\r
   IP6_PREFIX_LIST_ENTRY     *TmpPrefixEntry;\r
 \r
-  if (Prefix == NULL || PreferredLifetime > ValidLifetime || PrefixLength >= IP6_PREFIX_NUM) {\r
+  if (Prefix == NULL || PreferredLifetime > ValidLifetime || PrefixLength > IP6_PREFIX_MAX) {\r
     return NULL;\r
   }\r
 \r