]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg: Fix IPv4 UseDefaultAddress failure case.
authorJiaxin Wu <jiaxin.wu@intel.com>
Wed, 8 Jun 2016 02:41:39 +0000 (10:41 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Wed, 8 Jun 2016 07:17:31 +0000 (15:17 +0800)
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>
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c

index e733816556bf888dacb71af921da42a554860a41..91f1a67370e79279abfe99e895eec2daa6b2b708 100644 (file)
@@ -676,8 +676,11 @@ Ip4ConfigProtocol (
     // Use the default address. Check the state.\r
     //\r
     if (IpSb->State == IP4_SERVICE_UNSTARTED) {\r
     // Use the default address. Check the state.\r
     //\r
     if (IpSb->State == IP4_SERVICE_UNSTARTED) {\r
-      Status = EFI_NO_MAPPING;\r
-      goto ON_ERROR;\r
+      Status = Ip4StartAutoConfig (&IpSb->Ip4Config2Instance);\r
+\r
+      if (EFI_ERROR (Status)) {\r
+        goto ON_ERROR;\r
+      }\r
     }\r
 \r
     IpIf = IpSb->DefaultInterface;\r
     }\r
 \r
     IpIf = IpSb->DefaultInterface;\r