From 4ecc34706b00adc7c42dcd64871f187b1aa258cd Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Wed, 11 Sep 2019 16:02:51 +0200 Subject: [PATCH] discovery: permit SendTargets on normal sessions rfc3720 indicates that SendTargets on discovery *and* normal operational sessions must be supported by targets: A system that contains targets MUST support discovery sessions on each of its iSCSI IP address-port pairs, and MUST support the SendTargets command on the discovery session. ... A target MUST support the SendTargets command on operational sessions... Signed-off-by: David Disseldorp --- lib/discovery.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/discovery.c b/lib/discovery.c index 9ec8096..afaec56 100644 --- a/lib/discovery.c +++ b/lib/discovery.c @@ -39,12 +39,6 @@ iscsi_discovery_async(struct iscsi_context *iscsi, iscsi_command_cb cb, struct iscsi_pdu *pdu; char *str; - if (iscsi->session_type != ISCSI_SESSION_DISCOVERY) { - iscsi_set_error(iscsi, "Trying to do discovery on " - "non-discovery session."); - return -1; - } - pdu = iscsi_allocate_pdu(iscsi, ISCSI_PDU_TEXT_REQUEST, ISCSI_PDU_TEXT_RESPONSE, iscsi_itt_post_increment(iscsi),