Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Aug 2003 13:56:15 +0200
From:      Jesper Skriver <jesper@FreeBSD.org>
To:        Hartmut Brandt <harti@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/netinet tcp_output.c
Message-ID:  <20030813115615.GB43708@FreeBSD.org>
In-Reply-To: <200308130850.h7D8ohOj013289@repoman.freebsd.org>
References:  <200308130850.h7D8ohOj013289@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 13, 2003 at 01:50:43AM -0700, Hartmut Brandt wrote:
> harti       2003/08/13 01:50:42 PDT
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/netinet          tcp_output.c 
>   Log:
>   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.

Not quite, you execute code not excuted before, what about #ifdef TCPDEBUG ?

/Jesper

>   Revision  Changes    Path
>   1.79      +5 -1      src/sys/netinet/tcp_output.c
> http://cvsweb.FreeBSD.org/src/sys/netinet/tcp_output.c.diff?r1=1.78&r2=1.79&f=h
> | ===================================================================
> | RCS file: /usr/local/www/cvsroot/FreeBSD/src/sys/netinet/tcp_output.c,v
> | retrieving revision 1.78
> | retrieving revision 1.79
> | diff -u -p -r1.78 -r1.79
> | --- src/sys/netinet/tcp_output.c	2003/02/19 22:18:05	1.78
> | +++ src/sys/netinet/tcp_output.c	2003/08/13 08:50:42	1.79
> | @@ -31,7 +31,7 @@
> |   * SUCH DAMAGE.
> |   *
> |   *	@(#)tcp_output.c	8.4 (Berkeley) 5/24/95
> | - * $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netinet/tcp_output.c,v 1.78 2003/02/19 22:18:05 jlemon Exp $
> | + * $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netinet/tcp_output.c,v 1.79 2003/08/13 08:50:42 harti Exp $
> |   */
> |  
> |  #include "opt_inet6.h"
> | @@ -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
> |  
> |  	/*

/Jesper

-- 
Jesper Skriver, jesper(at)skriver(dot)dk  -  CCIE #5456

One Unix to rule them all, One Resolver to find them,
One IP to bring them all and in the zone to bind them.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030813115615.GB43708>