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 <ting.ye@intel.com>
Cc: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com>
Cc: Subramanian Sriram <sriram-s@hpe.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
Tested-by: Sriram Subramanian <sriram-s@hpe.com>
This commit is contained in:
Jiaxin Wu 2016-06-08 10:41:39 +08:00
parent ee46ac08fc
commit 923473ed49

View File

@ -676,9 +676,12 @@ Ip4ConfigProtocol (
// Use the default address. Check the state. // Use the default address. Check the state.
// //
if (IpSb->State == IP4_SERVICE_UNSTARTED) { if (IpSb->State == IP4_SERVICE_UNSTARTED) {
Status = EFI_NO_MAPPING; Status = Ip4StartAutoConfig (&IpSb->Ip4Config2Instance);
if (EFI_ERROR (Status)) {
goto ON_ERROR; goto ON_ERROR;
} }
}
IpIf = IpSb->DefaultInterface; IpIf = IpSb->DefaultInterface;
NET_GET_REF (IpSb->DefaultInterface); NET_GET_REF (IpSb->DefaultInterface);