Commit 3a0886c4 authored by GangCao's avatar GangCao Committed by Jim Harris
Browse files

iscsi: correct the error detail

According to https://tools.ietf.org/html/rfc3720#page-196

,

Error detail of "Authorization failure" is for the case that
the initiator is not allowed to the given target.

Change-Id: Ie628c4c857e965aa6694399a9832ce0501e50745
Signed-off-by: default avatarGangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456826


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent d5d7c570
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1429,9 +1429,8 @@ iscsi_op_login_check_target(struct spdk_iscsi_conn *conn,
					    conn->initiator_addr);
	if (!result) {
		SPDK_ERRLOG("access denied\n");
		/* Not found */
		rsph->status_class = ISCSI_CLASS_INITIATOR_ERROR;
		rsph->status_detail = ISCSI_LOGIN_TARGET_NOT_FOUND;
		rsph->status_detail = ISCSI_LOGIN_AUTHORIZATION_FAIL;
		return SPDK_ISCSI_LOGIN_ERROR_RESPONSE;
	}