public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ye, Ting" <ting.ye@intel.com>
To: "Wu, Jiaxin" <jiaxin.wu@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: Michael Turner <Michael.Turner@microsoft.com>,
	"Fu, Siyuan" <siyuan.fu@intel.com>
Subject: Re: [PATCH v1] NetworkPkg/Ip6Dxe: Clean the invalid IPv6 configuration during driver start.
Date: Mon, 11 Feb 2019 03:08:44 +0000	[thread overview]
Message-ID: <BC0C045B0E2A584CA4575E779FA2C12A1ABB033C@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20190203062345.996-1-Jiaxin.wu@intel.com>

Hi Jiaxin,

I agree we need start IPv6 stack no matter the configuration is valid or not. 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 
Sent: Sunday, February 3, 2019 2:24 PM
To: edk2-devel@lists.01.org
Cc: Michael Turner <Michael.Turner@microsoft.com>; Ye, Ting <ting.ye@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
Subject: [PATCH v1] NetworkPkg/Ip6Dxe: Clean the invalid IPv6 configuration during driver start.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1448

This patch is to clean the invalid data and continue to start IP6 driver.

Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Signed-off-by: Michael Turner <Michael.Turner@microsoft.com>
---
 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 != EFI_NOT_READY) {
-      goto UNINSTALL_PROTOCOL;
+      //
+      // Clean the invalid ManualAddress configuration.
+      //
+      Status = Ip6Cfg->SetData (
+                         Ip6Cfg,
+                         Ip6ConfigDataTypeManualAddress,
+                         0,
+                         NULL
+                         );
     }
   }
 
   //
   // 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 = Ip6Cfg->SetData (
+                         Ip6Cfg,
+                         Ip6ConfigDataTypeGateway,
+                         0,
+                         NULL
+                         );
     }
   }
 
   //
   // ready to go: start the receiving and timer
--
2.17.1.windows.2



  reply	other threads:[~2019-02-11  3:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-03  6:23 [PATCH v1] NetworkPkg/Ip6Dxe: Clean the invalid IPv6 configuration during driver start Jiaxin Wu
2019-02-11  3:08 ` Ye, Ting [this message]
2019-02-11  3:09   ` Wu, Jiaxin
     [not found]     ` <DM5PR21MB01226CF9B9C9AC8B5605541F82640@DM5PR21MB0122.namprd21.prod.outlook.com>
2019-02-12  0:27       ` Fu, Siyuan
2019-02-12  0:48         ` Wu, Jiaxin
2019-02-12  2:26           ` Ye, Ting

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BC0C045B0E2A584CA4575E779FA2C12A1ABB033C@SHSMSX103.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox