From 5b793f754c3a792a1f413f408598d2f180ef5734 Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Thu, 16 Sep 2010 12:09:47 -0500 Subject: [PATCH] iscsi tools: fix multi pdu sendtargets discovery sequences Patch from Red Hat bugzilla: When doing discovery if the targets span multiple PDUs the iscsi tools are failing on several targets like tgt, because we are increasing the itt. We should not be incrementing the itt of pdus within a sequence. --- usr/discovery.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/usr/discovery.c b/usr/discovery.c index 381f825..e34cc63 100644 --- a/usr/discovery.c +++ b/usr/discovery.c @@ -496,9 +496,6 @@ request_targets(iscsi_session_t *session) text.ttt = ISCSI_RESERVED_TAG; text.flags = ISCSI_FLAG_CMD_FINAL; - if (++session->itt == ISCSI_RESERVED_TAG) - session->itt = 1; - if (!iscsi_io_send_pdu(&session->conn[0], hdr, ISCSI_DIGEST_NONE, data, ISCSI_DIGEST_NONE, session->conn[0].active_timeout)) { log_error("failed to send SendTargets PDU"); @@ -527,9 +524,6 @@ iterate_targets(iscsi_session_t *session, uint32_t ttt) text.ttt = ttt; text.flags = ISCSI_FLAG_CMD_FINAL; - if (++session->itt == ISCSI_RESERVED_TAG) - session->itt = 1; - if (!iscsi_io_send_pdu(&session->conn[0], pdu, ISCSI_DIGEST_NONE, data, ISCSI_DIGEST_NONE, session->conn[0].active_timeout)) { log_error("failed to send empty text PDU"); -- 2.11.4.GIT