From owner-freebsd-net@FreeBSD.ORG Thu May 8 21:15:07 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B83A2106564A for ; Thu, 8 May 2008 21:15:07 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id 70C0F8FC1A for ; Thu, 8 May 2008 21:15:07 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 8F52641C770; Thu, 8 May 2008 23:15:05 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id c++LHGxhCsR0; Thu, 8 May 2008 23:15:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id 3659F41C75D; Thu, 8 May 2008 23:15:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id E912B44487F; Thu, 8 May 2008 21:14:12 +0000 (UTC) Date: Thu, 8 May 2008 21:14:12 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: John Baldwin In-Reply-To: <200805081625.33093.jhb@FreeBSD.org> Message-ID: <20080508211342.M47338@maildrop.int.zabbadoz.net> References: <200805081625.33093.jhb@FreeBSD.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-net@FreeBSD.org, andre@FreeBSD.org Subject: Re: Small patch.. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2008 21:15:07 -0000 On Thu, 8 May 2008, John Baldwin wrote: > At work all the log(LOG_DEBUG, ...) statements in the TCP code in 7.x are > spamming the heck out of our dmesg so I am #if 0'ing all of them out and > while doing so ran into this case. Specifically, it doesn't actually bump > the stat counter unless it succeeds in allocating memory to log the debug > message. All the other places in the syncache and tcp input code always bump > the stats, so this patch fixes it to do that. looks good. > Index: tcp_syncache.c > =================================================================== > RCS file: /usr/cvs/src/sys/netinet/tcp_syncache.c,v > retrieving revision 1.143 > diff -u -r1.143 tcp_syncache.c > --- tcp_syncache.c 19 Apr 2008 03:39:17 -0000 1.143 > +++ tcp_syncache.c 8 May 2008 20:22:21 -0000 > @@ -567,10 +567,11 @@ > "connection attempt aborted by remote endpoint\n", > s, __func__); > tcpstat.tcps_sc_reset++; > - } else if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { > - log(LOG_DEBUG, "%s; %s: RST with invalid SEQ %u != IRS %u " > - "(+WND %u), segment ignored\n", > - s, __func__, th->th_seq, sc->sc_irs, sc->sc_wnd); > + } else { > + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) > + log(LOG_DEBUG, "%s; %s: RST with invalid SEQ %u != " > + "IRS %u (+WND %u), segment ignored\n", > + s, __func__, th->th_seq, sc->sc_irs, sc->sc_wnd); > tcpstat.tcps_badrst++; > } > > > -- Bjoern A. Zeeb Stop bit received. Insert coin for new game.