diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-05-20 08:12:25 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-05-20 08:12:25 +0000 |
commit | ce4106bec492fc943bb37c488f5c75944498e99d (patch) | |
tree | d56f3d198a2733f6dbbd5121c6baec48bae9f3ba /MdeModulePkg | |
parent | 32685030d80104ea2510bdc4d00282bf11aeb1f8 (diff) | |
download | edk2-ce4106bec492fc943bb37c488f5c75944498e99d.tar.gz edk2-ce4106bec492fc943bb37c488f5c75944498e99d.tar.bz2 edk2-ce4106bec492fc943bb37c488f5c75944498e99d.zip |
enhanced to support more routing table entry.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8342 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Library/DxeNetLib/DxeNetLib.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c index 59da12ce91..98cfc509cd 100644 --- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c +++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c @@ -1,7 +1,7 @@ /** @file
Network library.
-Copyright (c) 2005 - 2007, Intel Corporation.<BR>
+Copyright (c) 2005 - 2009, Intel Corporation.<BR>
All rights reserved. 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
@@ -37,7 +37,7 @@ EFI_DPC_PROTOCOL *mDpc = NULL; GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 mNetLibHexStr[] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
-#define NIC_ITEM_CONFIG_SIZE sizeof (NIC_IP4_CONFIG_INFO) + sizeof (EFI_IP4_ROUTE_TABLE) * 2
+#define NIC_ITEM_CONFIG_SIZE sizeof (NIC_IP4_CONFIG_INFO) + sizeof (EFI_IP4_ROUTE_TABLE) * MAX_IP4_CONFIG_IN_VARIABLE
//
// All the supported IP4 maskes in host byte order.
@@ -1287,7 +1287,7 @@ NetLibDefaultAddressIsStatic ( ConfigHdr = HiiConstructConfigHdr (&gEfiNicIp4ConfigVariableGuid, EFI_NIC_IP4_CONFIG_VARIABLE, Controller);
Len = StrLen (ConfigHdr);
- ConfigResp = AllocateZeroPool (Len + NIC_ITEM_CONFIG_SIZE * 2 + 200);
+ ConfigResp = AllocateZeroPool ((Len + NIC_ITEM_CONFIG_SIZE * 2 + 100) * sizeof (CHAR16));
if (ConfigResp == NULL) {
goto ON_EXIT;
}
@@ -1296,7 +1296,7 @@ NetLibDefaultAddressIsStatic ( String = ConfigResp + Len;
UnicodeSPrint (
String,
- (8 + 4 + 7 + 4) * sizeof (CHAR16),
+ (8 + 4 + 7 + 4 + 1) * sizeof (CHAR16),
L"&OFFSET=%04X&WIDTH=%04X",
OFFSET_OF (NIC_IP4_CONFIG_INFO, Source),
sizeof (UINT32)
@@ -1312,7 +1312,7 @@ NetLibDefaultAddressIsStatic ( goto ON_EXIT;
}
- ConfigInfo = AllocateZeroPool (sizeof (NIC_IP4_CONFIG_INFO));
+ ConfigInfo = AllocateZeroPool (sizeof (NIC_ITEM_CONFIG_SIZE));
if (ConfigInfo == NULL) {
goto ON_EXIT;
}
|