From: "Ye, Ting" <ting.ye@intel.com>
To: "Wu, Jiaxin" <jiaxin.wu@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: Naveen Santhapur <naveens@amiindia.co.in>,
"Fu, Siyuan" <siyuan.fu@intel.com>
Subject: Re: [Patch] NetworkPkg/Dhcp6Dxe: Handle the Nil UUID case
Date: Fri, 3 Mar 2017 08:27:05 +0000 [thread overview]
Message-ID: <BC0C045B0E2A584CA4575E779FA2C12A1A8B44A0@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1488527027-182460-1-git-send-email-jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
-----Original Message-----
From: Wu, Jiaxin
Sent: Friday, March 03, 2017 3:44 PM
To: edk2-devel@lists.01.org
Cc: Naveen Santhapur <naveens@amiindia.co.in>; Ye, Ting <ting.ye@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
Subject: [Patch] NetworkPkg/Dhcp6Dxe: Handle the Nil UUID case
Nil UUID is a special case with all zeros value. This patch is to handle this case to avoid the invalid DUID.
Cc: Naveen Santhapur <naveens@amiindia.co.in>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf | 4 +++-
NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h | 3 ++-
NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c | 4 ++--
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf b/NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
index 24cb9a9..40a6ee7 100644
--- a/NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
+++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
@@ -3,11 +3,11 @@
#
# 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>
+# Copyright (c) 2009 - 2017, 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 # http://opensource.org/licenses/bsd-license.php.
@@ -72,10 +72,12 @@
gEfiUdp6ProtocolGuid ## TO_START
gEfiDhcp6ServiceBindingProtocolGuid ## BY_START
gEfiDhcp6ProtocolGuid ## BY_START
gEfiIp6ConfigProtocolGuid ## TO_START
+[Guids]
+ gZeroGuid ## SOMETIMES_CONSUMES ## GUID
[Pcd]
gEfiNetworkPkgTokenSpaceGuid.PcdDhcp6UidType ## SOMETIMES_CONSUMES
[UserExtensions.TianoCore."ExtraFiles"]
diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h b/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h index 86ef8af..06780b6 100644
--- a/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h
+++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h
@@ -1,9 +1,9 @@
/** @file
Dhcp6 internal data structure and definition declaration.
- Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2017, 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
http://opensource.org/licenses/bsd-license.php.
@@ -35,10 +35,11 @@
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/UefiLib.h>
#include <Library/BaseLib.h>
#include <Library/NetLib.h>
#include <Library/PrintLib.h>
+#include <Guid/ZeroGuid.h>
typedef struct _DHCP6_IA_CB DHCP6_IA_CB;
typedef struct _DHCP6_INF_CB DHCP6_INF_CB;
typedef struct _DHCP6_TX_CB DHCP6_TX_CB;
diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c b/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c
index 2525a32..a65ed6d 100644
--- a/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c
+++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c
@@ -1,10 +1,10 @@
/** @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>
+ Copyright (c) 2009 - 2017, 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
http://opensource.org/licenses/bsd-license.php.
@@ -62,11 +62,11 @@ Dhcp6GenerateClientId (
//
//
// If System UUID is found from SMBIOS Table, use DUID-UUID type.
//
- if ((PcdGet8 (PcdDhcp6UidType) == Dhcp6DuidTypeUuid) && !EFI_ERROR (NetLibGetSystemGuid (&Uuid))) {
+ if ((PcdGet8 (PcdDhcp6UidType) == Dhcp6DuidTypeUuid) && !EFI_ERROR
+ (NetLibGetSystemGuid (&Uuid)) && !CompareGuid (&Uuid, &gZeroGuid)) {
//
//
// The format of DUID-UUID:
//
// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
--
1.9.5.msysgit.1
next prev parent reply other threads:[~2017-03-03 8:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-03 7:43 [Patch] NetworkPkg/Dhcp6Dxe: Handle the Nil UUID case Jiaxin Wu
2017-03-03 8:27 ` Ye, Ting [this message]
2017-03-03 8:34 ` Fu, Siyuan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BC0C045B0E2A584CA4575E779FA2C12A1A8B44A0@SHSMSX103.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox