mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
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> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
This commit is contained in:
parent
3858b4a1ff
commit
03f9cc20b8
@ -5,7 +5,7 @@
|
|||||||
# and other configuration parameters from DHCPv6 servers.
|
# and other configuration parameters from DHCPv6 servers.
|
||||||
#
|
#
|
||||||
# (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
# (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
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -74,6 +74,8 @@
|
|||||||
gEfiDhcp6ProtocolGuid ## BY_START
|
gEfiDhcp6ProtocolGuid ## BY_START
|
||||||
gEfiIp6ConfigProtocolGuid ## TO_START
|
gEfiIp6ConfigProtocolGuid ## TO_START
|
||||||
|
|
||||||
|
[Guids]
|
||||||
|
gZeroGuid ## SOMETIMES_CONSUMES ## GUID
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gEfiNetworkPkgTokenSpaceGuid.PcdDhcp6UidType ## SOMETIMES_CONSUMES
|
gEfiNetworkPkgTokenSpaceGuid.PcdDhcp6UidType ## SOMETIMES_CONSUMES
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Dhcp6 internal data structure and definition declaration.
|
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
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -37,6 +37,7 @@
|
|||||||
#include <Library/BaseLib.h>
|
#include <Library/BaseLib.h>
|
||||||
#include <Library/NetLib.h>
|
#include <Library/NetLib.h>
|
||||||
#include <Library/PrintLib.h>
|
#include <Library/PrintLib.h>
|
||||||
|
#include <Guid/ZeroGuid.h>
|
||||||
|
|
||||||
|
|
||||||
typedef struct _DHCP6_IA_CB DHCP6_IA_CB;
|
typedef struct _DHCP6_IA_CB DHCP6_IA_CB;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Dhcp6 support functions implementation.
|
Dhcp6 support functions implementation.
|
||||||
|
|
||||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
(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
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -64,7 +64,7 @@ Dhcp6GenerateClientId (
|
|||||||
//
|
//
|
||||||
// If System UUID is found from SMBIOS Table, use DUID-UUID type.
|
// 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:
|
// The format of DUID-UUID:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user