mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
Empty data segment during Login Phase is rather unlikely, but it's
not, by itself, a protocol error. This fixes interoperability with OpenBSD initiator. Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
1885dba7b1
commit
017cbe4aaa
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=261752
@ -61,9 +61,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 (request->pdu_data_len == 0)
|
||||
log_errx(1, "received Text PDU with empty data segment");
|
||||
|
||||
if (ntohl(bhstr->bhstr_cmdsn) < conn->conn_cmdsn) {
|
||||
log_errx(1, "received Text PDU with decreasing CmdSN: "
|
||||
"was %d, is %d", conn->conn_cmdsn, ntohl(bhstr->bhstr_cmdsn));
|
||||
|
@ -64,7 +64,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");
|
||||
|
@ -128,10 +128,6 @@ login_receive(struct connection *conn, bool initial)
|
||||
log_errx(1, "received Login PDU with unsupported "
|
||||
"Version-min 0x%x", bhslr->bhslr_version_min);
|
||||
}
|
||||
if (request->pdu_data_len == 0) {
|
||||
login_send_error(request, 0x02, 0x00);
|
||||
log_errx(1, "received Login PDU with empty data segment");
|
||||
}
|
||||
if (ntohl(bhslr->bhslr_cmdsn) < conn->conn_cmdsn) {
|
||||
login_send_error(request, 0x02, 0x05);
|
||||
log_errx(1, "received Login PDU with decreasing CmdSN: "
|
||||
|
Loading…
Reference in New Issue
Block a user