Index: netinet/tcp_subr.c =================================================================== RCS file: /cvs/src/sys/netinet/tcp_subr.c,v retrieving revision 1.125 diff -u -p -r1.125 tcp_subr.c --- netinet/tcp_subr.c 24 Oct 2013 11:31:43 -0000 1.125 +++ netinet/tcp_subr.c 24 Jan 2014 06:31:21 -0000 @@ -385,6 +385,7 @@ tcp_respond(struct tcpcb *tp, caddr_t te m->m_len = tlen; m->m_pkthdr.len = tlen; m->m_pkthdr.rcvif = (struct ifnet *) 0; + m->m_pkthdr.csum_flags |= M_TCP_CSUM_OUT; th->th_seq = htonl(seq); th->th_ack = htonl(ack); th->th_x2 = 0; @@ -410,9 +411,6 @@ tcp_respond(struct tcpcb *tp, caddr_t te ip6->ip6_nxt = IPPROTO_TCP; ip6->ip6_hlim = in6_selecthlim(tp ? tp->t_inpcb : NULL, NULL); /*XXX*/ ip6->ip6_plen = tlen - sizeof(struct ip6_hdr); - th->th_sum = 0; - th->th_sum = in6_cksum(m, IPPROTO_TCP, - sizeof(struct ip6_hdr), ip6->ip6_plen); HTONS(ip6->ip6_plen); ip6_output(m, tp ? tp->t_inpcb->inp_outputopts6 : NULL, (struct route_in6 *)ro, 0, NULL, NULL, @@ -420,19 +418,9 @@ tcp_respond(struct tcpcb *tp, caddr_t te break; #endif /* INET6 */ case AF_INET: - ih = (struct ipovly *)ip; - bzero(ih->ih_x1, sizeof ih->ih_x1); - ih->ih_len = htons((u_short)tlen - sizeof(struct ip)); - - /* - * There's no point deferring to hardware checksum processing - * here, as we only send a minimal TCP packet whose checksum - * we need to compute in any case. - */ - th->th_sum = 0; - th->th_sum = in_cksum(m, tlen); ip->ip_len = htons(tlen); ip->ip_ttl = ip_defttl; + ip->ip_tos = 0; ip_output(m, (void *)NULL, ro, ip_mtudisc ? IP_MTUDISC : 0, (void *)NULL, tp ? tp->t_inpcb : (void *)NULL); }
-- Henning Brauer, h...@bsws.de, henn...@openbsd.org BS Web Services GmbH, http://bsws.de, Full-Service ISP Secure Hosting, Mail and DNS Services. Dedicated Servers, Root to Fully Managed Henning Brauer Consulting, http://henningbrauer.com/