Subject: clear h/w csum flags in tcp_respond()
To: None <firstname.lastname@example.org>
From: john heasley <email@example.com>
Date: 01/03/2005 00:14:13
Unless I'm missing something, tcp_respond() always performs the TCP
checksum. Thus, the mbuf pkthdr csum_flags ought to be cleared, since
csum_data is not set for use with h/w checksuming by tcp_respond() and
the checksum does not need to be done twice.
I noticed it when my test box came back after crashing. The connections
that I had open before the crash were not reset. Note, this is an hme(4)
with my changes to ip_output() to stuff the pseudo-hdr checksum for hme's
brand of h/w checksum.
does this look ok/reasonable?
RCS file: /cvsroot/src/sys/netinet/tcp_subr.c,v
retrieving revision 1.176
diff -u -r1.176 tcp_subr.c
--- tcp_subr.c 19 Dec 2004 06:42:24 -0000 1.176
+++ tcp_subr.c 3 Jan 2005 00:02:02 -0000
@@ -689,6 +689,9 @@
+ /* clear h/w csum data from rx packet */
+ m->m_pkthdr.csum_flags = 0;
if ((flags & TH_SYN) == 0 || sizeof(*th0) > (th0->th_off << 2))
tlen = sizeof(*th0);