From owner-freebsd-current@FreeBSD.ORG Tue Dec 2 05:06:15 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 385CE16A4CF for ; Tue, 2 Dec 2003 05:06:15 -0800 (PST) Received: from mailtoaster1.pipeline.ch (mailtoaster1.pipeline.ch [62.48.0.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B76143F75 for ; Tue, 2 Dec 2003 05:06:13 -0800 (PST) (envelope-from andre@freebsd.org) Received: (qmail 85961 invoked from network); 2 Dec 2003 12:04:16 -0000 Received: from unknown (HELO freebsd.org) ([62.48.0.53]) (envelope-sender ) by mailtoaster1.pipeline.ch (qmail-ldap-1.03) with SMTP for ; 2 Dec 2003 12:04:16 -0000 Message-ID: <3FCC8E44.4E5DD159@freebsd.org> Date: Tue, 02 Dec 2003 14:06:12 +0100 From: Andre Oppermann X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: taku@cent.saitama-u.ac.jp References: <200312011940.00798.sam@errno.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: Sam Leffler cc: current@freebsd.org Subject: Re: [PATCH] fixes of tcp_hostcache.c X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 13:06:15 -0000 > 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