From 2aa02f14680f0df7eaf6b5391443b54c4af51f59 Mon Sep 17 00:00:00 2001 From: Jun-ichiro itojun Hagino Date: Sat, 21 Jul 2001 09:26:07 +0000 Subject: repair IPv6 TCP. th_sum has to be initialized to 0 on template. (older code had "th_sum = 0" at the bottom of the function, which was removed during TCP hardware checksumming change) --- sys/netinet/tcp_subr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/netinet/tcp_subr.c') diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 7920347759b..26835ef897d 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_subr.c,v 1.51 2001/07/18 00:18:51 marc Exp $ */ +/* $OpenBSD: tcp_subr.c,v 1.52 2001/07/21 09:26:06 itojun Exp $ */ /* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */ /* @@ -259,13 +259,13 @@ tcp_template(tp) ipv6->ip6_flow = htonl(0x60000000) | (inp->inp_ipv6.ip6_flow & htonl(0x0fffffff)); - ipv6->ip6_nxt = IPPROTO_TCP; ipv6->ip6_plen = htons(sizeof(struct tcphdr)); /*XXX*/ ipv6->ip6_hlim = in6_selecthlim(inp, NULL); /*XXX*/ th = (struct tcphdr *)(mtod(m, caddr_t) + sizeof(struct ip6_hdr)); + th->th_sum = 0; } break; #endif /* INET6 */ -- cgit v1.2.3