summaryrefslogtreecommitdiffstats
path: root/NetworkPkg
diff options
context:
space:
mode:
authorZhang, Lubo <lubo.zhang@intel.com>2017-04-06 16:58:09 +0800
committerJiaxin Wu <jiaxin.wu@intel.com>2017-04-20 15:52:53 +0800
commit52cad7d0d8e0ec94ca6152f9f7c56f48ca15825e (patch)
tree2ac65862c36d4ffce6eb3f8dbf05a6f0accb8b05 /NetworkPkg
parentb28bf4143d00142323d5dd9a9129b9b25d0dff56 (diff)
downloadedk2-52cad7d0d8e0ec94ca6152f9f7c56f48ca15825e.tar.gz
edk2-52cad7d0d8e0ec94ca6152f9f7c56f48ca15825e.tar.bz2
edk2-52cad7d0d8e0ec94ca6152f9f7c56f48ca15825e.zip
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 <lubo.zhang@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Diffstat (limited to 'NetworkPkg')
-rw-r--r--NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c4
1 files changed, 4 insertions, 0 deletions
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.