Empty data segment during Login Phase is rather unlikely, but it's not

a protocol error.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
trasz 2014-02-11 10:45:20 +00:00
parent 1df3a6bf79
commit 39c661e770
3 changed files with 1 additions and 7 deletions

View File

@ -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),

View File

@ -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");

View File

@ -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) {
/*