TCP host cache used by other protocols (UDP, ICMP)

sthaug at nethelp.no sthaug at nethelp.no
Tue May 4 20:51:57 UTC 2010


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 at nethelp.no


More information about the freebsd-net mailing list