From 923473ed495a09cd13f6b614139ce74ce2bae18f Mon Sep 17 00:00:00 2001 From: Jiaxin Wu Date: Wed, 8 Jun 2016 10:41:39 +0800 Subject: [PATCH] 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 --- MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; -- 2.39.2