Browse Source

Bugfix: the TCP connection will now be closed if the login response Status Class is not 0

Tal Aloni 8 years ago
parent
commit
0f79d59add
1 changed files with 2 additions and 1 deletions
  1. 2 1
      ISCSI/ISCSI.Server/ISCSIServer.cs

+ 2 - 1
ISCSI/ISCSI.Server/ISCSIServer.cs

@@ -355,8 +355,9 @@ namespace ISCSI.Server
                     }
                     else if (response is LoginResponsePDU)
                     {
-                        if (((LoginResponsePDU)response).Status == LoginResponseStatusName.InvalidDuringLogon)
+                        if (((LoginResponsePDU)response).Status != LoginResponseStatusName.Success)
                         {
+                            // Login Response: If the Status Class is not 0, the initiator and target MUST close the TCP connection.
                             clientSocket.Close(); // We can close the connection now
                             Log(Severity.Trace, "Leaving ProcessSendQueue");
                             return;