Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 May 2010 22:51:54 +0200 (CEST)
From:      sthaug@nethelp.no
To:        freebsd-net@freebsd.org
Subject:   TCP host cache used by other protocols (UDP, ICMP)
Message-ID:  <20100504.225154.74721744.sthaug@nethelp.no>

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



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