Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 May 2008 21:14:12 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        freebsd-net@FreeBSD.org, andre@FreeBSD.org
Subject:   Re: Small patch..
Message-ID:  <20080508211342.M47338@maildrop.int.zabbadoz.net>
In-Reply-To: <200805081625.33093.jhb@FreeBSD.org>
References:  <200805081625.33093.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



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