]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c
Update HiiDataBase to fix the SCT hang issues by the invalid device path.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / IScsiDxe / IScsiConfig.c
index 8982a3b99fc0e06ba2d0ae66d6bf8b0265810bad..59840f7f060309e98712aad6f1af159684549524 100644 (file)
@@ -359,9 +359,10 @@ IScsiFormExtractConfig (
   ISCSI_FORM_CALLBACK_INFO         *Private;\r
   EFI_HII_CONFIG_ROUTING_PROTOCOL  *HiiConfigRouting;\r
 \r
-  if (Request == NULL) {\r
+  if (Request == NULL || Progress == NULL || Results == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
+  *Progress = Request;\r
 \r
   if (!mIScsiDeviceListUpdated) {\r
     //\r
@@ -444,6 +445,20 @@ IScsiFormRouteConfig (
   OUT EFI_STRING                             *Progress\r
   )\r
 {\r
+  if (Configuration == NULL || Progress == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
+  //\r
+  // Check routing data in <ConfigHdr>.\r
+  // Note: if only one Storage is used, then this checking could be skipped.\r
+  //\r
+  if (!HiiIsConfigHdrMatch (Configuration, &mVendorGuid, mVendorStorageName)) {\r
+    *Progress = Configuration;\r
+    return EFI_NOT_FOUND;\r
+  }\r
+\r
+  *Progress = Configuration + StrLen (Configuration);\r
   return EFI_SUCCESS;\r
 }\r
 \r