Subject: Re: clear h/w csum flags in tcp_respond()
To: Jason Thorpe <thorpej@shagadelic.org>
From: john heasley <heas@shrubbery.net>
List: tech-net
Date: 01/03/2005 12:15:10
Sun, Jan 02, 2005 at 11:48:08PM -0800, Jason Thorpe:
>=20
> On Jan 2, 2005, at 4:14 PM, john heasley wrote:
>=20
> >does this look ok/reasonable?
>=20
> Yes, please check it in.

Thanks.

I just noticed this too.  As far as I can see, it not really necessary for
tcp_respond() to set the header length though, since ip6_output() appears
to compute it unconditionally.  But, I do not have the means to test at
the moment.

Is this change ok, or should the assigment just be removed?

Index: tcp_subr.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/src/sys/netinet/tcp_subr.c,v
retrieving revision 1.177
diff -u -r1.177 tcp_subr.c
--- tcp_subr.c	3 Jan 2005 19:47:30 -0000	1.177
+++ tcp_subr.c	3 Jan 2005 19:57:22 -0000
@@ -804,7 +804,7 @@
 		th->th_sum =3D 0;
 		th->th_sum =3D in6_cksum(m, IPPROTO_TCP, sizeof(struct ip6_hdr),
 				tlen);
-		ip6->ip6_plen =3D ntohs(tlen);
+		ip6->ip6_plen =3D htons(tlen);
 		if (tp && tp->t_in6pcb) {
 			struct ifnet *oifp;
 			ro =3D (struct route *)&tp->t_in6pcb->in6p_route;