Date: Thu, 30 Dec 1999 05:20:02 -0800 (PST) From: Ruslan Ermilov <ru@FreeBSD.ORG> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/15494: over-natd connections hang if MTUs are different Message-ID: <199912301320.FAA64076@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/15494; it has been noted by GNATS. From: Ruslan Ermilov <ru@FreeBSD.ORG> To: Mikhail Teterin <mi@kot.ne.mediaone.net> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912301320.FAA64076>