From owner-freebsd-net@FreeBSD.ORG Wed May 5 07:05:43 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A978B1065670 for ; Wed, 5 May 2010 07:05:43 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 6DAAC8FC19 for ; Wed, 5 May 2010 07:05:43 +0000 (UTC) Received: from lstewart.caia.swin.edu.au (lstewart.caia.swin.edu.au [136.186.229.95]) by lauren.room52.net (Postfix) with ESMTPSA id 503627E853; Wed, 5 May 2010 17:05:41 +1000 (EST) Message-ID: <4BE118C1.40706@freebsd.org> Date: Wed, 05 May 2010 17:05:37 +1000 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9) Gecko/20100409 Thunderbird/3.0.4 MIME-Version: 1.0 To: sthaug@nethelp.no References: <20100504.225154.74721744.sthaug@nethelp.no> In-Reply-To: <20100504.225154.74721744.sthaug@nethelp.no> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: TCP host cache used by other protocols (UDP, ICMP) 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: Wed, 05 May 2010 07:05:43 -0000 On 05/05/10 06:51, sthaug@nethelp.no wrote: > The following was done on a 7.3-STABLE system. > > While debugging an IPv6 path MTU problem I discovered to my surprise > that the TCP host cache (use "sysctl net.inet.tcp.hostcache.list" to > see it) is also used by UDP and ICMP, at least for IPv6. Scenario: > > - Run ping6 or traceroute6 (traceroute6 with or without -I option) > with a large packet size (ping6 -s 1452, traceroute6 ... 1460). > - ICMPv6 "fragmentation needed" is returned from an intermediate hop. > - This ICMPv6 message creates a TCP host cache entry. > - Next packet (ICMPv6 or UDP) which is sent by ping6 or traceroute6 is > fragmented by the FreeBSD kernel according to the TCP host cache entry > even though TCP has not been involved at all. > > If this host cache is going to be used for *all* protocols running on > top of IPv4 / IPv6, it would be nice to have a different name than TCP > host cache. Also, some references to this host cache in the man pages > for netstat, route etc would be good - as it was I had to dig into the > source code to understand what was happening. Another entry for the > wish list is a way of purging an individual entry in this host cache > immediately. > > Comments? Yeah, the host cache is a mess and it's on my TODO list to overhaul it. Sharing it between all protocols is desirable, but I agree the current state of affairs is not up to scratch. It's not something I'm likely to get to for quite some time though so if anyone is keen to get involved I'd be happy to coordinate with them. Cheers, Lawrence