]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
MdeModulePkg/DxeCapsuleLibFmp: Fix build failure issues
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4Impl.c
index 58adba7c8c158518dcaa5ff55d8378a46fc4dc28..91f1a67370e79279abfe99e895eec2daa6b2b708 100644 (file)
@@ -676,8 +676,11 @@ Ip4ConfigProtocol (
     // 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
@@ -838,7 +841,7 @@ Ip4StationAddressValid (
   //\r
   // Only support the continuous net masks\r
   //\r
-  if ((Len = NetGetMaskLength (Netmask)) == IP4_MASK_NUM) {\r
+  if ((Len = NetGetMaskLength (Netmask)) == (IP4_MASK_MAX + 1)) {\r
     return FALSE;\r
   }\r
 \r