aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_output.c
diff options
context:
space:
mode:
authorHartmut Brandt <harti@FreeBSD.org>2003-08-13 08:50:42 +0000
committerHartmut Brandt <harti@FreeBSD.org>2003-08-13 08:50:42 +0000
commit91f467d592738edef923190ba97b4431e4e9e28e (patch)
treec790ca0e09a6409a80a7167f3b76ccbee6684fa3 /sys/netinet/tcp_output.c
parent3c653157a56fc6272e11810b106988044affa660 (diff)
downloadsrc-91f467d592738edef923190ba97b4431e4e9e28e.tar.gz
src-91f467d592738edef923190ba97b4431e4e9e28e.zip
The tcp_trace call needs the length of the header. Unfortunately the
code has rotten a bit so that the header length is not correct at the point when tcp_trace is called. Temporarily compute the correct value before the call and restore the old value after. This makes ports/benchmarks/dbs to almost work. This is a NOP unless you compile with TCPDEBUG.
Notes
Notes: svn path=/head/; revision=118862
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r--sys/netinet/tcp_output.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 2cb6acfe3041..1267aaf8e397 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -848,8 +848,12 @@ send:
/*
* Trace.
*/
- if (so->so_options & SO_DEBUG)
+ if (so->so_options & SO_DEBUG) {
+ u_short save = ipov->ih_len;
+ ipov->ih_len = htons(m->m_pkthdr.len /* - hdrlen + (th->th_off << 2) */);
tcp_trace(TA_OUTPUT, tp->t_state, tp, mtod(m, void *), th, 0);
+ ipov->ih_len = save;
+ }
#endif
/*