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.
This commit is contained in:
parent
3c653157a5
commit
91f467d592
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118862
@ -848,8 +848,12 @@ tcp_output(struct tcpcb *tp)
|
||||
/*
|
||||
* 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
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user