]> git.proxmox.com Git - mirror_edk2.git/commitdiff
NetworkPkg: Fix bug related DAD issue in IP6 driver.
authorZhang, Lubo <lubo.zhang@intel.com>
Thu, 6 Apr 2017 08:58:09 +0000 (16:58 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Thu, 20 Apr 2017 07:52:53 +0000 (15:52 +0800)
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>
NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c

index bde5982b69b6883fed9859bd0bf083c1b2ba17c2..7575b7947d9989d724ff590abe117b0ce73eb596 100644 (file)
@@ -784,6 +784,10 @@ Ip6ManualAddrDadCallback (
   Item       = &Instance->DataItem[Ip6ConfigDataTypeManualAddress];\r
   ManualAddr = NULL;\r
 \r
+  if (Item->DataSize == 0) {\r
+    return;\r
+  }\r
+\r
   for (Index = 0; Index < Item->DataSize / sizeof (EFI_IP6_CONFIG_MANUAL_ADDRESS); Index++) {\r
     //\r
     // Find the original tag used to place into the NET_MAP.\r