Author: bz
Date: Mon Jun 20 07:07:18 2011
New Revision: 223326
URL: http://svn.freebsd.org/changeset/base/223326

Log:
  Fix a KASSERT from r212803 to check the correct length also in case of
  IPsec being compiled in and used.  Improve reporting by adding the length
  fields to the panic message, so that we would have some immediate debugging
  hints.
  
  Discussed with:       jhb

Modified:
  head/sys/netinet/tcp_output.c

Modified: head/sys/netinet/tcp_output.c
==============================================================================
--- head/sys/netinet/tcp_output.c       Mon Jun 20 03:25:09 2011        
(r223325)
+++ head/sys/netinet/tcp_output.c       Mon Jun 20 07:07:18 2011        
(r223326)
@@ -1102,8 +1102,15 @@ send:
                m->m_pkthdr.tso_segsz = tp->t_maxopd - optlen;
        }
 
+#ifdef IPSEC
+       KASSERT(len + hdrlen + ipoptlen - ipsec_optlen == m_length(m, NULL),
+           ("%s: mbuf chain shorter than expected: %ld + %u + %u - %u != %u",
+           __func__, len, hdrlen, ipoptlen, ipsec_optlen, m_length(m, NULL)));
+#else
        KASSERT(len + hdrlen + ipoptlen == m_length(m, NULL),
-           ("%s: mbuf chain shorter than expected", __func__));
+           ("%s: mbuf chain shorter than expected: %ld + %u + %u != %u",
+           __func__, len, hdrlen, ipoptlen, m_length(m, NULL)));
+#endif
 
        /*
         * In transmit state, time the transmission and arrange for
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to