diff options
author | Samer El-Haj-Mahmoud <elhaj@hp.com> | 2015-07-01 02:17:07 +0000 |
---|---|---|
committer | sfu5 <sfu5@Edk2> | 2015-07-01 02:17:07 +0000 |
commit | c413813d61a592206ba80a5a96a07e39a264475e (patch) | |
tree | e1364faf4dd57e79df6e6fdf174975649007ccfa /NetworkPkg/Dhcp6Dxe | |
parent | 2ce8ce9b064c0058964cb35ddc7272059fb7663c (diff) | |
download | edk2-platforms-c413813d61a592206ba80a5a96a07e39a264475e.tar.xz |
NetworkPkg: Add IPv6 DUID configuration support using platform PCD.
The code today always uses DUID-UUID unless there is an error in reading the UUID,
which results in falling through to DUID-LLT. This change allows the platform to
control the DUID method (DUID-UUID or DUID-LLT) using a platform dynamic PCD.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hp.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17751 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'NetworkPkg/Dhcp6Dxe')
-rw-r--r-- | NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf | 7 | ||||
-rw-r--r-- | NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf b/NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf index 5c79237046..1ba9656df2 100644 --- a/NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf +++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf @@ -4,6 +4,7 @@ # This driver produces EFI DHCPv6 Protocol which is used to get IPv6 addresses
# and other configuration parameters from DHCPv6 servers.
#
+# (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
@@ -51,7 +52,7 @@ [Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
-
+ NetworkPkg/NetworkPkg.dec
[LibraryClasses]
UefiLib
@@ -73,5 +74,9 @@ gEfiDhcp6ProtocolGuid ## BY_START
gEfiIp6ConfigProtocolGuid ## TO_START
+
+[Pcd]
+ gEfiNetworkPkgTokenSpaceGuid.PcdDhcp6UidType
+
[UserExtensions.TianoCore."ExtraFiles"]
Dhcp6DxeExtra.uni
diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c b/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c index e3349ee987..2525a32ff1 100644 --- a/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c +++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c @@ -1,6 +1,7 @@ /** @file
Dhcp6 support functions implementation.
+ (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
@@ -63,7 +64,7 @@ Dhcp6GenerateClientId ( //
// If System UUID is found from SMBIOS Table, use DUID-UUID type.
//
- if (!EFI_ERROR (NetLibGetSystemGuid (&Uuid))) {
+ if ((PcdGet8 (PcdDhcp6UidType) == Dhcp6DuidTypeUuid) && !EFI_ERROR (NetLibGetSystemGuid (&Uuid))) {
//
//
// The format of DUID-UUID:
|