diff options
| author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2013-12-30 12:18:06 +0000 |
|---|---|---|
| committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2013-12-30 12:18:06 +0000 |
| commit | 68ca2e2ebbe203009ba0dc5d75296dd7ca6e1f7e (patch) | |
| tree | dfe5ccc6c0087b8d539ed975f8cf602f1a226b03 /sys/dev/iscsi/icl.c | |
| parent | 3dc8dee92e55e32000fed98ce1cc95b19ab9841b (diff) | |
Notes
Diffstat (limited to 'sys/dev/iscsi/icl.c')
| -rw-r--r-- | sys/dev/iscsi/icl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/iscsi/icl.c b/sys/dev/iscsi/icl.c index f29f0d2cf3c57..e0e11791b87f3 100644 --- a/sys/dev/iscsi/icl.c +++ b/sys/dev/iscsi/icl.c @@ -239,7 +239,7 @@ icl_pdu_size(const struct icl_pdu *response) icl_pdu_padding(response); if (response->ip_conn->ic_header_crc32c) len += ISCSI_HEADER_DIGEST_SIZE; - if (response->ip_conn->ic_data_crc32c) + if (response->ip_data_len != 0 && response->ip_conn->ic_data_crc32c) len += ISCSI_DATA_DIGEST_SIZE; return (len); @@ -615,7 +615,7 @@ icl_conn_receive_pdu(struct icl_conn *ic, size_t *availablep) break; ic->ic_receive_state = ICL_CONN_STATE_DATA_DIGEST; - if (ic->ic_data_crc32c == false) + if (request->ip_data_len == 0 || ic->ic_data_crc32c == false) ic->ic_receive_len = 0; else ic->ic_receive_len = ISCSI_DATA_DIGEST_SIZE; |
