diff options
author | trasz <trasz@FreeBSD.org> | 2014-02-11 10:45:20 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2014-02-11 10:45:20 +0000 |
commit | 39c661e770208d4268cf375c3739c4fd8d42ba80 (patch) | |
tree | 45c08f74ca1505c440e725ef59a2246898364197 /usr.sbin | |
parent | 1df3a6bf799d8ec06b162b2e87c607e3ce1a6a86 (diff) | |
download | FreeBSD-src-39c661e770208d4268cf375c3739c4fd8d42ba80.zip FreeBSD-src-39c661e770208d4268cf375c3739c4fd8d42ba80.tar.gz |
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')
-rw-r--r-- | usr.sbin/iscsid/discovery.c | 2 | ||||
-rw-r--r-- | usr.sbin/iscsid/keys.c | 2 | ||||
-rw-r--r-- | usr.sbin/iscsid/login.c | 4 |
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) { /* |