* [patch] NetworkPkg: Fix bug related DAD issue in IP6 driver.
@ 2017-04-06 8:58 Zhang Lubo
2017-04-07 0:33 ` Wu, Jiaxin
0 siblings, 1 reply; 2+ messages in thread
From: Zhang Lubo @ 2017-04-06 8:58 UTC (permalink / raw)
To: edk2-devel; +Cc: Wu Jiaxin, Ye Ting, Fu Siyuan
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>
---
NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
index bde5982..7575b79 100644
--- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
+++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
@@ -782,10 +782,14 @@ Ip6ManualAddrDadCallback (
Instance = (IP6_CONFIG_INSTANCE *) Context;
NET_CHECK_SIGNATURE (Instance, IP6_CONFIG_INSTANCE_SIGNATURE);
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.
//
ManualAddr = Item->Data.ManualAddress + Index;
--
1.9.5.msysgit.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] NetworkPkg: Fix bug related DAD issue in IP6 driver.
2017-04-06 8:58 [patch] NetworkPkg: Fix bug related DAD issue in IP6 driver Zhang Lubo
@ 2017-04-07 0:33 ` Wu, Jiaxin
0 siblings, 0 replies; 2+ messages in thread
From: Wu, Jiaxin @ 2017-04-07 0:33 UTC (permalink / raw)
To: Zhang, Lubo, edk2-devel@lists.01.org; +Cc: Ye, Ting, Fu, Siyuan
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Thanks,
Jiaxin
> -----Original Message-----
> From: Zhang, Lubo
> Sent: Thursday, April 6, 2017 4:58 PM
> To: edk2-devel@lists.01.org
> Cc: Wu, Jiaxin <jiaxin.wu@intel.com>; Ye, Ting <ting.ye@intel.com>; Fu,
> Siyuan <siyuan.fu@intel.com>
> 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 <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>
> ---
> NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
> b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
> index bde5982..7575b79 100644
> --- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
> +++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
> @@ -782,10 +782,14 @@ Ip6ManualAddrDadCallback (
> Instance = (IP6_CONFIG_INSTANCE *) Context;
> NET_CHECK_SIGNATURE (Instance, IP6_CONFIG_INSTANCE_SIGNATURE);
> 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.
> //
> ManualAddr = Item->Data.ManualAddress + Index;
> --
> 1.9.5.msysgit.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-07 0:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-06 8:58 [patch] NetworkPkg: Fix bug related DAD issue in IP6 driver Zhang Lubo
2017-04-07 0:33 ` Wu, Jiaxin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox