From owner-freebsd-net@FreeBSD.ORG Tue May 4 20:51:57 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 AC31A1065673 for ; Tue, 4 May 2010 20:51:57 +0000 (UTC) (envelope-from sthaug@nethelp.no) Received: from bizet.nethelp.no (bizet.nethelp.no [195.1.209.33]) by mx1.freebsd.org (Postfix) with SMTP id E4D9E8FC1E for ; Tue, 4 May 2010 20:51:56 +0000 (UTC) Received: (qmail 96145 invoked from network); 4 May 2010 20:51:54 -0000 Received: from bizet.nethelp.no (HELO localhost) (195.1.209.33) by bizet.nethelp.no with SMTP; 4 May 2010 20:51:54 -0000 Date: Tue, 04 May 2010 22:51:54 +0200 (CEST) Message-Id: <20100504.225154.74721744.sthaug@nethelp.no> To: freebsd-net@freebsd.org From: sthaug@nethelp.no X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: 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: Tue, 04 May 2010 20:51:57 -0000 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? Steinar Haug, Nethelp consulting, sthaug@nethelp.no