Re: [PATCH] fixes of tcp_hostcache.c

From: Andre Oppermann <andre_at_freebsd.org>
Date: Tue, 02 Dec 2003 14:06:12 +0100
> Greetings,
> 
> I found two calls of bcopy() in tcp_hostcache.c got the source and the
> destination pointer wrongly.
> # Perhaps the author got confused with memcpy(), I guess.

Indeed.  Originally these were memcpy calls and I've been asked to change
them to bcopy calls.  Which I did.  It didn't occur to me that bcopy would
change the destination from left-hand to right-hand argument...  But that
seems to be a common pitfall. :/

> The fix is attached as a patch against tcp_hostcache.c as of revision 1.2.
> 
> Please review and incorporate the patch to the tree because the bug makes
> hostcache useless with TCPv6 and/or brings TTCP (RFC1644) meaningless.
> Especially the bug renders it unusable to use TCPv6 and TTCP together.
> # To confirm this: sysctl net.inet.tcp.rfc1644=1; telnet ::1

This also fixes the problem Hajimu-san is seeing with pathmtu discovery
which I thought to reside in ip6_getpmtu().

Thank you for catching the bug!
-- 
Andre
Received on Tue Dec 02 2003 - 04:06:15 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:32 UTC