Project

General

Profile

Bug #1598

bug fixes for iSCSI / ESX 3.5

Added by Garrett D'Amore almost 8 years ago.

Status:
New
Priority:
Normal
Category:
comstar - iSCSI/FC/SAS target
Start date:
2011-10-05
Due date:
% Done:

80%

Estimated time:
Difficulty:
Medium
Tags:

Description

At Nexenta, we have had for a long time a few fixes for two bugs in iSCSI that affect interoperability with older versions of VMware ESX. We would like to get these integrated into illumos. (These have been well tested for over 18 months.)


diff -r 37c7067e8e6e -r 47a39d2ff170 usr/src/uts/common/io/comstar/port/iscsit/iscsit_login.c
--- a/usr/src/uts/common/io/comstar/port/iscsit/iscsit_login.c
+++ b/usr/src/uts/common/io/comstar/port/iscsit/iscsit_login.c
@@ -798,6 +798,7 @@
        iscsi_login_hdr_t *lh_req = (iscsi_login_hdr_t *)pdu->isp_hdr;
        iscsi_login_rsp_hdr_t *lh_resp =
            ict->ict_login_sm.icl_login_resp_tmpl;
+       int expstatsn;

        /*
         * First login PDU, this connection should not have a sesssion
@@ -818,6 +819,14 @@
        ict->ict_cid = ntohs(lh_req->cid);

        /*
+        * work around for ESX 3.5, aka Cisco initiator
+        */
+       expstatsn = ntohl(lh_req->expstatsn);
+       if (ict->ict_statsn == 1 && expstatsn == 0) {
+               ict->ict_statsn = 0;
+       }
+
+       /*
         * Set the CSG, NSG and Transit bits based on the first PDU
         * in the login sequence.  The CSG already validated in
         * login_sm_req_pdu_check(). We'll clear the transit bit if
@@ -2010,8 +2019,13 @@
                 * However, the answer for a key not understood MUST be
                 * key=NotUnderstood.
                 */
+               char *ptr = strchr(nvp_name, '=');
+               if (ptr != NULL)
+                       *ptr = 0;
                kvrc = iscsit_reply_string(ict, nvp_name,
                    ISCSI_TEXT_NOTUNDERSTOOD);
+               if (ptr != NULL)
+                       *ptr = '=';
        } else {
                kvrc = iscsit_handle_common_key(ict, nvp, ikvx);
                if (kvrc == KV_UNHANDLED) {

Also available in: Atom PDF