summaryrefslogtreecommitdiffstats
path: root/usr.sbin/iscsid
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2014-03-06 11:14:36 +0000
committertrasz <trasz@FreeBSD.org>2014-03-06 11:14:36 +0000
commit222c71033f3068a1124e34bdbfb8ab0c41e1f964 (patch)
tree0047384385b2c5081eecfc4ecb6c5cab740fbaf4 /usr.sbin/iscsid
parent80217e6e6eb97488583c54d9a8c83098aae96a55 (diff)
downloadFreeBSD-src-222c71033f3068a1124e34bdbfb8ab0c41e1f964.zip
FreeBSD-src-222c71033f3068a1124e34bdbfb8ab0c41e1f964.tar.gz
MFC r261747:
Empty data segment during Login Phase is rather unlikely, but it's not a protocol error. Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'usr.sbin/iscsid')
-rw-r--r--usr.sbin/iscsid/discovery.c2
-rw-r--r--usr.sbin/iscsid/keys.c2
-rw-r--r--usr.sbin/iscsid/login.c4
3 files changed, 1 insertions, 7 deletions
diff --git a/usr.sbin/iscsid/discovery.c b/usr.sbin/iscsid/discovery.c
index b5731de..9f0db81 100644
--- a/usr.sbin/iscsid/discovery.c
+++ b/usr.sbin/iscsid/discovery.c
@@ -62,8 +62,6 @@ text_receive(struct connection *conn)
*/
if ((bhstr->bhstr_flags & BHSTR_FLAGS_CONTINUE) != 0)
log_errx(1, "received Text PDU with unsupported \"C\" flag");
- if (response->pdu_data_len == 0)
- log_errx(1, "received Text PDU with empty data segment");
if (ntohl(bhstr->bhstr_statsn) != conn->conn_statsn + 1) {
log_errx(1, "received Text PDU with wrong StatSN: "
"is %d, should be %d", ntohl(bhstr->bhstr_statsn),
diff --git a/usr.sbin/iscsid/keys.c b/usr.sbin/iscsid/keys.c
index d9055a2..49340e0 100644
--- a/usr.sbin/iscsid/keys.c
+++ b/usr.sbin/iscsid/keys.c
@@ -65,7 +65,7 @@ keys_load(struct keys *keys, const struct pdu *pdu)
size_t pair_len;
if (pdu->pdu_data_len == 0)
- log_errx(1, "protocol error: empty data segment");
+ return;
if (pdu->pdu_data[pdu->pdu_data_len - 1] != '\0')
log_errx(1, "protocol error: key not NULL-terminated\n");
diff --git a/usr.sbin/iscsid/login.c b/usr.sbin/iscsid/login.c
index 2ae36e8..4275f7e 100644
--- a/usr.sbin/iscsid/login.c
+++ b/usr.sbin/iscsid/login.c
@@ -189,10 +189,6 @@ login_receive(struct connection *conn, bool initial)
fail(conn, errorstr);
log_errx(1, "target returned error: %s", errorstr);
}
-#if 0
- if (response->pdu_data_len == 0)
- log_errx(1, "received Login PDU with empty data segment");
-#endif
if (initial == false &&
ntohl(bhslr->bhslr_statsn) != conn->conn_statsn + 1) {
/*
OpenPOWER on IntegriCloud