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

Lawrence Stewart lstewart at freebsd.org
Wed May 5 07:05:43 UTC 2010


On 05/05/10 06:51, sthaug at 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


More information about the freebsd-net mailing list