From owner-freebsd-bugs Thu Dec 30 5:20: 4 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 63F1C152F0 for ; Thu, 30 Dec 1999 05:20:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id FAA64076; Thu, 30 Dec 1999 05:20:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Date: Thu, 30 Dec 1999 05:20:02 -0800 (PST) Message-Id: <199912301320.FAA64076@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Ruslan Ermilov Subject: Re: kern/15494: over-natd connections hang if MTUs are different Reply-To: Ruslan Ermilov Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/15494; it has been noted by GNATS. From: Ruslan Ermilov To: Mikhail Teterin Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: kern/15494: over-natd connections hang if MTUs are different Date: Thu, 30 Dec 1999 15:11:36 +0200 --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii On Wed, Dec 15, 1999 at 09:46:04AM -0500, Mikhail Teterin wrote: > > A gateway machine with two interfaces -- public and private > running natd. A client machine with one interface. > > The problem observed with the FreeBSD-3.3 (x86) client and > with the Linux Redhat-6.0 client (on Alpha). > > The MTUs on the gateway's interfaces are set to 900 (seems > to work better with this ancient 3Com ISA cards). The client's > MTU was set to 1500. > > Any TCP connection made by the client (handled by the gateway's > natd) would soon hang in the middle of data transfer. > I bet you have your aliasing address specified as an IP number (with -a option) rather than derived from an interface name (-n). Am I right? If yes, could you please try the following patch. -- Ruslan Ermilov Sysadmin and DBA of the ru@ucb.crimea.ua United Commercial Bank, ru@FreeBSD.org FreeBSD committer, +380.652.247.647 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="natd.c.patch" Index: natd.c =================================================================== RCS file: /usr/FreeBSD-CVS/src/sbin/natd/natd.c,v retrieving revision 1.23 diff -u -r1.23 natd.c --- natd.c 1999/10/13 09:00:16 1.23 +++ natd.c 1999/12/30 13:00:45 @@ -601,13 +601,15 @@ if (errno == ENOBUFS) return; - if (errno == EMSGSIZE) { - - if (packetDirection == OUTPUT && - ifMTU != -1) - SendNeedFragIcmp (icmpSock, + if (errno == EMSGSIZE && packetDirection == OUTPUT) { + if (ifMTU != -1) + SendNeedFragIcmp(icmpSock, (struct ip*) packetBuf, ifMTU - aliasOverhead); + else + SendNeedFragIcmp(icmpSock, + (struct ip*) packetBuf, + packetLen - aliasOverhead); } else { --sm4nu43k4a2Rpi4c-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message