]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c
Adopt new IPv4/IPv6 device path for network modules.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / IScsiDxe / IScsiMisc.c
index f1cd943a561a15b4610dea71797a16ff3517010a..5341e5a01ef8bf1187b0272b88714ab040d08d14 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Miscellaneous routines for iSCSI driver.\r
 \r
-Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -684,7 +684,7 @@ IScsiGetConfigData (
   BufferSize = sizeof (Session->AuthData.AuthConfig);\r
   Status = gRT->GetVariable (\r
                   MacString,\r
-                  &mIScsiCHAPAuthInfoGuid,\r
+                  &gIScsiCHAPAuthInfoGuid,\r
                   NULL,\r
                   &BufferSize,\r
                   &Session->AuthData.AuthConfig\r
@@ -757,7 +757,19 @@ IScsiGetTcpConnDevicePath (
         ) {\r
 \r
       DPathNode->Ipv4.LocalPort       = 0;\r
-      DPathNode->Ipv4.StaticIpAddress = (BOOLEAN) (!Session->ConfigData.NvData.InitiatorInfoFromDhcp);\r
+      DPathNode->Ipv4.StaticIpAddress = \r
+        (BOOLEAN) (!Session->ConfigData.NvData.InitiatorInfoFromDhcp);\r
+\r
+      IP4_COPY_ADDRESS (\r
+        &DPathNode->Ipv4.GatewayIpAddress,\r
+        &Session->ConfigData.NvData.Gateway\r
+        );\r
+\r
+      IP4_COPY_ADDRESS (\r
+        &DPathNode->Ipv4.SubnetMask,\r
+        &Session->ConfigData.NvData.SubnetMask\r
+        );\r
+\r
       break;\r
     }\r
 \r