diff options
author | mav <mav@FreeBSD.org> | 2016-02-12 10:58:13 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2016-02-12 10:58:13 +0000 |
commit | 1ca3ca2fd307dd0124940aac802e60893a53f0d8 (patch) | |
tree | 0f998d5c53c14ac5bed578b7eaab0d389af7a7b5 /usr.sbin/ctld/login.c | |
parent | a05a278552bfbdc67dd026be8a748c627b57d0c4 (diff) | |
download | FreeBSD-src-1ca3ca2fd307dd0124940aac802e60893a53f0d8.zip FreeBSD-src-1ca3ca2fd307dd0124940aac802e60893a53f0d8.tar.gz |
Don't check CmdSN for initial login request.
This fixes connection errors for some initiators not starting CmdSN
from zero.
While there, fix wrong status details reported for couple errors.
MFC after: 3 days
Diffstat (limited to 'usr.sbin/ctld/login.c')
-rw-r--r-- | usr.sbin/ctld/login.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/ctld/login.c b/usr.sbin/ctld/login.c index 72c23ce..3710dbc 100644 --- a/usr.sbin/ctld/login.c +++ b/usr.sbin/ctld/login.c @@ -126,15 +126,16 @@ login_receive(struct connection *conn, bool initial) log_errx(1, "received Login PDU with unsupported " "Version-min 0x%x", bhslr->bhslr_version_min); } - if (ISCSI_SNLT(ntohl(bhslr->bhslr_cmdsn), conn->conn_cmdsn)) { - login_send_error(request, 0x02, 0x05); + if (initial == false && + ISCSI_SNLT(ntohl(bhslr->bhslr_cmdsn), conn->conn_cmdsn)) { + login_send_error(request, 0x02, 0x00); log_errx(1, "received Login PDU with decreasing CmdSN: " "was %u, is %u", conn->conn_cmdsn, ntohl(bhslr->bhslr_cmdsn)); } if (initial == false && ntohl(bhslr->bhslr_expstatsn) != conn->conn_statsn) { - login_send_error(request, 0x02, 0x05); + login_send_error(request, 0x02, 0x00); log_errx(1, "received Login PDU with wrong ExpStatSN: " "is %u, should be %u", ntohl(bhslr->bhslr_expstatsn), conn->conn_statsn); |