From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=ting.ye@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 D451E208D6147 for ; Sun, 10 Feb 2019 19:08:47 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Feb 2019 19:08:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,357,1544515200"; d="scan'208";a="319282019" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga005.fm.intel.com with ESMTP; 10 Feb 2019 19:08:47 -0800 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 10 Feb 2019 19:08:47 -0800 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 10 Feb 2019 19:08:46 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.194]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.190]) with mapi id 14.03.0415.000; Mon, 11 Feb 2019 11:08:44 +0800 From: "Ye, Ting" To: "Wu, Jiaxin" , "edk2-devel@lists.01.org" CC: Michael Turner , "Fu, Siyuan" Thread-Topic: [PATCH v1] NetworkPkg/Ip6Dxe: Clean the invalid IPv6 configuration during driver start. Thread-Index: AQHUu4kH/WFeGii7LUuss2tnPIM8DKXZ9QQQ Date: Mon, 11 Feb 2019 03:08:44 +0000 Message-ID: References: <20190203062345.996-1-Jiaxin.wu@intel.com> In-Reply-To: <20190203062345.996-1-Jiaxin.wu@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v1] NetworkPkg/Ip6Dxe: Clean the invalid IPv6 configuration during driver start. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Feb 2019 03:08:48 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Jiaxin, I agree we need start IPv6 stack no matter the configuration is valid or no= t. However I would suggest to add more comments and pop up warning messages= to let user know we continue to start IPv6 stack without using previously = saved configuration. Thanks, Ting -----Original Message----- From: Wu, Jiaxin=20 Sent: Sunday, February 3, 2019 2:24 PM To: edk2-devel@lists.01.org Cc: Michael Turner ; Ye, Ting ; Fu, Siyuan ; Wu, Jiaxin Subject: [PATCH v1] NetworkPkg/Ip6Dxe: Clean the invalid IPv6 configuration= during driver start. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1448 This patch is to clean the invalid data and continue to start IP6 driver. Cc: Michael Turner Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Wu Jiaxin Signed-off-by: Michael Turner --- NetworkPkg/Ip6Dxe/Ip6Driver.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/NetworkPkg/Ip6Dxe/Ip6Driver.c b/NetworkPkg/Ip6Dxe/Ip6Driver.c = index 4c607125a6..1bd1c61da8 100644 --- a/NetworkPkg/Ip6Dxe/Ip6Driver.c +++ b/NetworkPkg/Ip6Dxe/Ip6Driver.c @@ -586,11 +586,19 @@ Ip6DriverBindingStart ( Ip6ConfigDataTypeManualAddress, DataItem->DataSize, DataItem->Data.Ptr ); if (EFI_ERROR(Status) && Status !=3D EFI_NOT_READY) { - goto UNINSTALL_PROTOCOL; + // + // Clean the invalid ManualAddress configuration. + // + Status =3D Ip6Cfg->SetData ( + Ip6Cfg, + Ip6ConfigDataTypeManualAddress, + 0, + NULL + ); } } =20 // // If there is any default gateway address, set it. @@ -602,11 +610,19 @@ Ip6DriverBindingStart ( Ip6ConfigDataTypeGateway, DataItem->DataSize, DataItem->Data.Ptr ); if (EFI_ERROR(Status)) { - goto UNINSTALL_PROTOCOL; + // + // Clean the invalid Gateway configuration. + // + Status =3D Ip6Cfg->SetData ( + Ip6Cfg, + Ip6ConfigDataTypeGateway, + 0, + NULL + ); } } =20 // // ready to go: start the receiving and timer -- 2.17.1.windows.2