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:55:04 +0800
commitc0b1ed569f16bb1e0ba8ccc8e2b8ed696928dfda (patch)
tree6aca241e477a92eb9e9da8050fba5e812ddb4ff3 /NetworkPkg
parentd7c94fca2f390e070a310ffdaa926bc100b86485 (diff)
downloadedk2-c0b1ed569f16bb1e0ba8ccc8e2b8ed696928dfda.tar.gz
edk2-c0b1ed569f16bb1e0ba8ccc8e2b8ed696928dfda.tar.bz2
edk2-c0b1ed569f16bb1e0ba8ccc8e2b8ed696928dfda.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> (cherry picked from commit 52cad7d0d8e0ec94ca6152f9f7c56f48ca15825e)
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.