diff options
author | Marco S Hyman <marc@cvs.openbsd.org> | 2001-07-18 00:18:52 +0000 |
---|---|---|
committer | Marco S Hyman <marc@cvs.openbsd.org> | 2001-07-18 00:18:52 +0000 |
commit | a551f9360da7e4e9553ed6a4e800120165b901c1 (patch) | |
tree | ffd6ff7327de065680367c4c463820146b6f8473 /sys/netinet/tcp_subr.c | |
parent | 1f268ec512eef9b77fb2e41e6d37d998562b1f26 (diff) |
zero tcp checksum field before calculating new value.
Fixes problem with bad checksums on keepalives
OK provos@
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r-- | sys/netinet/tcp_subr.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |