Fix a bug about iSCSI initiator(based on NetworkPkg-IPv4 network stack) cannot reinst...
authorWu Jiaxin <jiaxin.wu@intel.com>
Tue, 19 Nov 2013 05:52:10 +0000 (05:52 +0000)
committerjiaxinwu <jiaxinwu@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 19 Nov 2013 05:52:10 +0000 (05:52 +0000)
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com >
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Jin Eric <eric.jin@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14862 6f19259b-4bc3-4df7-8a09-765794883524

NetworkPkg/IScsiDxe/IScsiProto.c

index 8c0bbec..29b3c24 100644 (file)
@@ -228,7 +228,7 @@ IScsiCreateConnection (
   Conn->PartialRspRcvd  = FALSE;\r
   Conn->ParamNegotiated = FALSE;\r
   Conn->Cid             = Session->NextCid++;\r
-  Conn->Ipv6Flag        = mPrivate->Ipv6Flag;\r
+  Conn->Ipv6Flag        = NvData->IpMode == IP_MODE_IP6 || Session->ConfigData->AutoConfigureMode == IP_MODE_AUTOCONFIG_IP6;\r
 \r
   Status = gBS->CreateEvent (\r
                   EVT_TIMER,\r
@@ -472,7 +472,7 @@ IScsiSessionLogin (
   if (!EFI_ERROR (Status)) {\r
     Session->State = SESSION_STATE_LOGGED_IN;\r
 \r
-    if (!mPrivate->Ipv6Flag) {\r
+    if (!Conn->Ipv6Flag) {\r
       ProtocolGuid = &gEfiTcp4ProtocolGuid;      \r
     } else {\r
       ProtocolGuid = &gEfiTcp6ProtocolGuid;\r
@@ -489,7 +489,7 @@ IScsiSessionLogin (
 \r
     ASSERT_EFI_ERROR (Status);\r
 \r
-    if (mPrivate->Ipv6Flag) {\r
+    if (Conn->Ipv6Flag) {\r
       Status = IScsiGetIp6NicInfo (Conn);\r
     }\r
   }\r