diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-06-23 19:02:54 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-06-23 19:02:54 +0000 |
commit | 136e91cef1ef078a812fa06027ca51d411674dea (patch) | |
tree | 1f373d70cb196f58c36806866466d749b9c0832d /sys/netinet | |
parent | ced2c454722870f31392314819901f8b783c25f5 (diff) |
Add comment on why checksum deferral is not useful in tcp_respond()
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/tcp_subr.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index b8b8cbf7918..38f4243d42d 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_subr.c,v 1.46 2001/06/08 03:53:46 angelos Exp $ */ +/* $OpenBSD: tcp_subr.c,v 1.47 2001/06/23 19:02:53 angelos Exp $ */ /* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */ /* @@ -424,6 +424,12 @@ tcp_respond(tp, template, m, ack, seq, flags) { bzero(ti->ti_x1, sizeof ti->ti_x1); ti->ti_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 = in_cksum(m, tlen); ((struct ip *)ti)->ip_len = tlen; ((struct ip *)ti)->ip_ttl = ip_defttl; |