summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_subr.c
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-07-21 09:26:07 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-07-21 09:26:07 +0000
commit2aa02f14680f0df7eaf6b5391443b54c4af51f59 (patch)
treed111311fd46def414808d02e59d6b7abe2935e94 /sys/netinet/tcp_subr.c
parent9487b4e17bb4b5620730d0e97b93d398b2f24480 (diff)
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)
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r--sys/netinet/tcp_subr.c4
1 files changed, 2 insertions, 2 deletions
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 */