]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Ip6Dxe/Ip6Common.c
NetworkPkg: Refine codes related to Dhcpv4 and Dhcpv6 configuration.
[mirror_edk2.git] / NetworkPkg / Ip6Dxe / Ip6Common.c
index 4f71d052bf85c16a2a2b4596cd92257dd1f1922b..7007301f817bbc0c0383cd6b977e9700029c275a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The implementation of common functions shared by IP6 driver.\r
 \r
-  Copyright (c) 2009 - 2014, 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
@@ -428,7 +428,7 @@ Ip6RemoveAddr (
   IP6_ADDRESS_INFO     *AddrInfo;\r
   EFI_IPv6_ADDRESS     SnMCastAddr;\r
 \r
-  if (IsListEmpty (AddressList) || *AddressCount < 1 || PrefixLength > IP6_PREFIX_NUM) {\r
+  if (IsListEmpty (AddressList) || *AddressCount < 1 || PrefixLength > IP6_PREFIX_MAX) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -606,7 +606,7 @@ Ip6CopyAddressByPrefix (
   UINT8 Mask;\r
 \r
   ASSERT (Dest != NULL && Src != NULL);\r
-  ASSERT (PrefixLength < IP6_PREFIX_NUM);\r
+  ASSERT (PrefixLength <= IP6_PREFIX_MAX);\r
 \r
   Byte = (UINT8) (PrefixLength / 8);\r
   Bit  = (UINT8) (PrefixLength % 8);\r