summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2004-06-05 11:56:51 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2004-06-05 11:56:51 +0000
commitb605d26d99584dae44c5efdf479380ae4504c3e6 (patch)
tree3b598de80ffa608fa095c41f03d88e7bcd0cc34f /sys/netinet
parent31fa11de5b3256af5c700900141ee07fc8ee81b0 (diff)
set m_pkthdr.len early; ok mcbride, deraadt
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/tcp_output.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 7683013ce2f..b921b40c0be 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_output.c,v 1.68 2004/05/31 20:04:44 brad Exp $ */
+/* $OpenBSD: tcp_output.c,v 1.69 2004/06/05 11:56:50 markus Exp $ */
/* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */
/*
@@ -765,6 +765,7 @@ send:
m->m_len = hdrlen;
}
m->m_pkthdr.rcvif = (struct ifnet *)0;
+ m->m_pkthdr.len = hdrlen + len;
if (!tp->t_template)
panic("tcp_output");
@@ -1009,7 +1010,6 @@ send:
#endif /* INET */
#ifdef INET6
case AF_INET6:
- m->m_pkthdr.len = hdrlen + len;
th->th_sum = in6_cksum(m, IPPROTO_TCP, sizeof(struct ip6_hdr),
hdrlen - sizeof(struct ip6_hdr) + len);
break;
@@ -1101,7 +1101,6 @@ send:
* to handle ttl and tos; we could keep them in
* the template, but need a way to checksum without them.
*/
- m->m_pkthdr.len = hdrlen + len;
#ifdef TCP_ECN
/*