From owner-cvs-src@FreeBSD.ORG Wed Aug 13 04:56:18 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F05D37B401; Wed, 13 Aug 2003 04:56:18 -0700 (PDT) Received: from freesbee.wheel.dk (freesbee.wheel.dk [193.162.159.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 558D343F93; Wed, 13 Aug 2003 04:56:17 -0700 (PDT) (envelope-from jesper@skriver.dk) Received: by freesbee.wheel.dk (Postfix, from userid 1001) id D55283852A; Wed, 13 Aug 2003 13:56:15 +0200 (CEST) Date: Wed, 13 Aug 2003 13:56:15 +0200 From: Jesper Skriver To: Hartmut Brandt Message-ID: <20030813115615.GB43708@FreeBSD.org> Mail-Followup-To: Jesper Skriver , Hartmut Brandt , src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org References: <200308130850.h7D8ohOj013289@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200308130850.h7D8ohOj013289@repoman.freebsd.org> User-Agent: Mutt/1.4.1i X-PGP-Fingerprint: 6B88 9CE8 66E9 E631 C9C5 5EB4 22AB F0EC F956 1C31 X-PGP-Public-Key: http://freesbee.wheel.dk/~jesper/gpgkey.pub cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet tcp_output.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2003 11:56:19 -0000 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.