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: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456826
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
GangCao 2019-06-04 21:32:30 -04:00 committed by Jim Harris
parent d5d7c57043
commit 3a0886c408

View File

@ -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;
}