Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!proteon.com!jas From: jas@proteon.com (John A. Shriver) Newsgroups: comp.protocols.tcp-ip Subject: Odd FTP Problem Message-ID: <8902241624.AA26178@monk.proteon.com> Date: 24 Feb 89 16:24:17 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 36 Well Mark, that indeed sounds like a great way to improve the antisocial behaviour of 4.[23]bsd in the face of ICMP host and net unreachables. I looked at the source (ip_input.c, tcp_subr.c, protosw.h), and it certainly seems that will have the deisred result. The u_char array inetctlerrmap (in ip_input.c) maps the generic error types from protosw.h to error numbers from errno.h. Offsets 8 and 9 are (protosw.h): #define PRC_UNREACH_NET 8 /* no route to network */ #define PRC_UNREACH_HOST 9 /* no route to host */ which are mapped repsectively to (errno.h): #define ENETUNREACH 51 /* Network is unreachable */ #define EHOSTUNREACH 65 /* No route to host */ Entries in that array which are 0 do not cause user errors. Patching 8 & 9 to zero should do this. Here's an example. Be careful to use lower case `w'. # adb -w /vmunix /dev/kmem inetctlerrmap?w0 patches disk inetctlerrmap/w0 patches memory I have not tried this, no guaruntees. It looks like this works in 4.3bsd, Ultrix 2.2, and SunOS 3.5. It still is not the optimal solution, which would be to pass a warning to the user layer, so they could decide what to do. I suspect that is why there is a /* XXX */ at the end of tcp_ctlinput() in tcp_subr.c. (/* XXX */ is Berkeley shorthand for kludge, should be fixed.) There are no comments on the entire subroutine. Any 4.3bsd gurus out there like to verify this?