mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
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 <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
This commit is contained in:
committed by
Christoph Hellwig
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user