From c0b1ed569f16bb1e0ba8ccc8e2b8ed696928dfda Mon Sep 17 00:00:00 2001 From: "Zhang, Lubo" Date: Thu, 6 Apr 2017 16:58:09 +0800 Subject: [PATCH] NetworkPkg: Fix bug related DAD issue in IP6 driver. If we set PXEv6 as the first boot option and reboot immediately after the first successful boot, it will assert. the root cause is when we set the policy from manual to automatic in PXE driver, the ip6 Configure item size is already set to zero and other structures are also released, So it is not needed to perform DAD call back function which is invoked by Ip6ConfigSetMaunualAddress. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo Cc: Wu Jiaxin Cc: Ye Ting Cc: Fu Siyuan Reviewed-by: Jiaxin Wu (cherry picked from commit 52cad7d0d8e0ec94ca6152f9f7c56f48ca15825e) --- NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c index bde5982b69..7575b7947d 100644 --- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c +++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c @@ -784,6 +784,10 @@ Ip6ManualAddrDadCallback ( Item = &Instance->DataItem[Ip6ConfigDataTypeManualAddress]; ManualAddr = NULL; + if (Item->DataSize == 0) { + return; + } + for (Index = 0; Index < Item->DataSize / sizeof (EFI_IP6_CONFIG_MANUAL_ADDRESS); Index++) { // // Find the original tag used to place into the NET_MAP.