From nobody Thu May 2 11:14:25 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 149146909359623.96914837446991; Thu, 6 Apr 2017 01:58:13 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 7907621942351; Thu, 6 Apr 2017 01:58:12 -0700 (PDT) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 67FF521A04830 for ; Thu, 6 Apr 2017 01:58:11 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP; 06 Apr 2017 01:58:11 -0700 Received: from shwdeopenpsi116.ccr.corp.intel.com ([10.239.9.5]) by orsmga005.jf.intel.com with ESMTP; 06 Apr 2017 01:58:10 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,283,1488873600"; d="scan'208";a="83825033" From: Zhang Lubo To: edk2-devel@lists.01.org Date: Thu, 6 Apr 2017 16:58:09 +0800 Message-Id: <1491469089-36756-1-git-send-email-lubo.zhang@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 Subject: [edk2] [patch] NetworkPkg: Fix bug related DAD issue in IP6 driver. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ye Ting , Fu Siyuan , Wu Jiaxin MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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: Wu Jiaxin --- NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c b/NetworkPkg/Ip6Dxe/Ip6Confi= gImpl.c index bde5982..7575b79 100644 --- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c +++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c @@ -782,10 +782,14 @@ Ip6ManualAddrDadCallback ( Instance =3D (IP6_CONFIG_INSTANCE *) Context; NET_CHECK_SIGNATURE (Instance, IP6_CONFIG_INSTANCE_SIGNATURE); Item =3D &Instance->DataItem[Ip6ConfigDataTypeManualAddress]; ManualAddr =3D NULL; =20 + if (Item->DataSize =3D=3D 0) { + return; + } + for (Index =3D 0; Index < Item->DataSize / sizeof (EFI_IP6_CONFIG_MANUAL= _ADDRESS); Index++) { // // Find the original tag used to place into the NET_MAP. // ManualAddr =3D Item->Data.ManualAddress + Index; --=20 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel