svn commit: r314376 - stable/11/sys/dev/iscsi

Alexander Motin mav at FreeBSD.org
Tue Feb 28 06:28:18 UTC 2017


Author: mav
Date: Tue Feb 28 06:28:17 2017
New Revision: 314376
URL: https://svnweb.freebsd.org/changeset/base/314376

Log:
  MFC r313738: Temporary attach AHS to BHS to calculate header digest.

Modified:
  stable/11/sys/dev/iscsi/icl_soft.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/iscsi/icl_soft.c
==============================================================================
--- stable/11/sys/dev/iscsi/icl_soft.c	Tue Feb 28 05:24:06 2017	(r314375)
+++ stable/11/sys/dev/iscsi/icl_soft.c	Tue Feb 28 06:28:17 2017	(r314376)
@@ -389,10 +389,10 @@ icl_pdu_check_header_digest(struct icl_p
 
 	*availablep -= ISCSI_HEADER_DIGEST_SIZE;
 
-	/*
-	 * XXX: Handle AHS.
-	 */
+	/* Temporary attach AHS to BHS to calculate header digest. */
+	request->ip_bhs_mbuf->m_next = request->ip_ahs_mbuf;
 	valid_digest = icl_mbuf_to_crc32c(request->ip_bhs_mbuf);
+	request->ip_bhs_mbuf->m_next = NULL;
 	if (received_digest != valid_digest) {
 		ICL_WARN("header digest check failed; got 0x%x, "
 		    "should be 0x%x", received_digest, valid_digest);


More information about the svn-src-all mailing list