nvmet-tcp: fix header digest verification
Pass the correct length to nvmet_tcp_verify_hdgst, which is the pdu header length. This fixes a wrong behaviour where header digest verification passes although the digest is wrong. Signed-off-by: Amit Engel <amit.engel@dell.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
e790de54e9
commit
86aeda32b8
|
@ -1096,7 +1096,7 @@ recv:
|
|||
}
|
||||
|
||||
if (queue->hdr_digest &&
|
||||
nvmet_tcp_verify_hdgst(queue, &queue->pdu, queue->offset)) {
|
||||
nvmet_tcp_verify_hdgst(queue, &queue->pdu, hdr->hlen)) {
|
||||
nvmet_tcp_fatal_error(queue); /* fatal */
|
||||
return -EPROTO;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue