From 3a0886c408bbe3ff6b6269d6500f2f5594f98b47 Mon Sep 17 00:00:00 2001 From: GangCao Date: Tue, 4 Jun 2019 21:32:30 -0400 Subject: [PATCH] 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 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456826 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- lib/iscsi/iscsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/iscsi/iscsi.c b/lib/iscsi/iscsi.c index 4b4ecf29a..c164138fc 100644 --- a/lib/iscsi/iscsi.c +++ b/lib/iscsi/iscsi.c @@ -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; }