diff options
Diffstat (limited to 'MdeModulePkg/Universal')
4 files changed, 9 insertions, 9 deletions
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c index 17e0247832..d0fa132621 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c @@ -416,7 +416,7 @@ Ip4Config2BuildDefaultRouteTable ( //
Count = 0;
- for (Index = IP4_MASK_NUM - 1; Index >= 0; Index--) {
+ for (Index = IP4_MASK_MAX; Index >= 0; Index--) {
NET_LIST_FOR_EACH (Entry, &(IpSb->DefaultRouteTable->RouteArea[Index])) {
RtEntry = NET_LIST_USER_STRUCT (Entry, IP4_ROUTE_ENTRY, Link);
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c index 669e041c10..e457276796 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c @@ -1,7 +1,7 @@ /** @file
Implement IP4 pesudo interface.
-Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -581,7 +581,7 @@ Ip4SetAddress ( Type = NetGetIpClass (IpAddr);
ASSERT (Type <= IP4_ADDR_CLASSC);
Len = NetGetMaskLength (SubnetMask);
- ASSERT (Len < IP4_MASK_NUM);
+ ASSERT (Len <= IP4_MASK_MAX);
Netmask = gIp4AllMasks[MIN (Len, Type << 3)];
Interface->NetBrdcast = (IpAddr | ~Netmask);
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c index 58adba7c8c..e733816556 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c @@ -838,7 +838,7 @@ Ip4StationAddressValid ( //
// Only support the continuous net masks
//
- if ((Len = NetGetMaskLength (Netmask)) == IP4_MASK_NUM) {
+ if ((Len = NetGetMaskLength (Netmask)) == (IP4_MASK_MAX + 1)) {
return FALSE;
}
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.c index ea0023ddcb..d240d5343a 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.c @@ -1,6 +1,6 @@ /** @file
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -204,7 +204,7 @@ Ip4CreateRouteTable ( RtTable->RefCnt = 1;
RtTable->TotalNum = 0;
- for (Index = 0; Index < IP4_MASK_NUM; Index++) {
+ for (Index = 0; Index <= IP4_MASK_MAX; Index++) {
InitializeListHead (&(RtTable->RouteArea[Index]));
}
@@ -241,7 +241,7 @@ Ip4FreeRouteTable ( //
// Free all the route table entry and its route cache.
//
- for (Index = 0; Index < IP4_MASK_NUM; Index++) {
+ for (Index = 0; Index <= IP4_MASK_MAX; Index++) {
NET_LIST_FOR_EACH_SAFE (Entry, Next, &(RtTable->RouteArea[Index])) {
RtEntry = NET_LIST_USER_STRUCT (Entry, IP4_ROUTE_ENTRY, Link);
@@ -469,7 +469,7 @@ Ip4FindRouteEntry ( RtEntry = NULL;
- for (Index = IP4_MASK_NUM - 1; Index >= 0; Index--) {
+ for (Index = IP4_MASK_MAX; Index >= 0; Index--) {
for (Table = RtTable; Table != NULL; Table = Table->Next) {
NET_LIST_FOR_EACH (Entry, &Table->RouteArea[Index]) {
RtEntry = NET_LIST_USER_STRUCT (Entry, IP4_ROUTE_ENTRY, Link);
@@ -641,7 +641,7 @@ Ip4BuildEfiRouteTable ( //
Count = 0;
- for (Index = IP4_MASK_NUM - 1; Index >= 0; Index--) {
+ for (Index = IP4_MASK_MAX; Index >= 0; Index--) {
for (RtTable = IpInstance->RouteTable; RtTable != NULL; RtTable = RtTable->Next) {
NET_LIST_FOR_EACH (Entry, &(RtTable->RouteArea[Index])) {
RtEntry = NET_LIST_USER_STRUCT (Entry, IP4_ROUTE_ENTRY, Link);
|