From: Jiaxin Wu Date: Wed, 8 Jun 2016 02:41:39 +0000 (+0800) Subject: MdeModulePkg: Fix IPv4 UseDefaultAddress failure case. X-Git-Tag: edk2-stable201903~6881 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=923473ed495a09cd13f6b614139ce74ce2bae18f MdeModulePkg: Fix IPv4 UseDefaultAddress failure case. This patch is used to update IP4->Configure() to allow the upper layer modules to obtain a default address by setting UseDefaultAddress to TRUE when default address is not available yet. Cc: Ye Ting Cc: El-Haj-Mahmoud Samer Cc: Subramanian Sriram Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu Reviewed-by: Ye Ting Reviewed-by: Ye Ting Reviewed-by: Sriram Subramanian Tested-by: Sriram Subramanian --- diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c index e733816556..91f1a67370 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c @@ -676,8 +676,11 @@ Ip4ConfigProtocol ( // Use the default address. Check the state. // if (IpSb->State == IP4_SERVICE_UNSTARTED) { - Status = EFI_NO_MAPPING; - goto ON_ERROR; + Status = Ip4StartAutoConfig (&IpSb->Ip4Config2Instance); + + if (EFI_ERROR (Status)) { + goto ON_ERROR; + } } IpIf = IpSb->DefaultInterface;