Agree, thanks the comment. I will update the patch.


> -----Original Message-----
> From: Ye, Ting
> Sent: Monday, February 11, 2019 11:09 AM
> To: Wu, Jiaxin <jiaxin...@intel.com>; edk2-devel@lists.01.org
> Cc: Michael Turner <michael.tur...@microsoft.com>; Fu, Siyuan
> <siyuan...@intel.com>
> Subject: RE: [PATCH v1] NetworkPkg/Ip6Dxe: Clean the invalid IPv6
> configuration during driver start.
> 
> 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.tur...@microsoft.com>; Ye, Ting
> <ting...@intel.com>; Fu, Siyuan <siyuan...@intel.com>; Wu, Jiaxin
> <jiaxin...@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.tur...@microsoft.com>
> Cc: Ye Ting <ting...@intel.com>
> Cc: Fu Siyuan <siyuan...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Wu Jiaxin <jiaxin...@intel.com>
> Signed-off-by: Michael Turner <michael.tur...@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

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to