From a551f9360da7e4e9553ed6a4e800120165b901c1 Mon Sep 17 00:00:00 2001 From: Marco S Hyman Date: Wed, 18 Jul 2001 00:18:52 +0000 Subject: zero tcp checksum field before calculating new value. Fixes problem with bad checksums on keepalives OK provos@ --- sys/netinet/tcp_subr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/netinet/tcp_subr.c') diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index e2444a531d5..7920347759b 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_subr.c,v 1.50 2001/07/03 04:26:37 angelos Exp $ */ +/* $OpenBSD: tcp_subr.c,v 1.51 2001/07/18 00:18:51 marc Exp $ */ /* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */ /* @@ -431,6 +431,7 @@ tcp_respond(tp, template, m, ack, seq, flags) * 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); ((struct ip *)ti)->ip_len = tlen; ((struct ip *)ti)->ip_ttl = ip_defttl; -- cgit v1.2.3