Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!PURDUE.EDU!narten From: narten@PURDUE.EDU (Thomas Narten) Newsgroups: comp.protocols.tcp-ip Subject: Re: Odd FTP Problem (4.3 BSD kernel patches) Message-ID: <8902251856.AA07509@percival.cs.purdue.edu> Date: 25 Feb 89 18:55:57 GMT References: <8902241624.AA26178@monk.proteon.com> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 44 [ Stuff about using adb to xero out errors in inetctlerrmap ] The suggested fix causes 4.3 to ignore ICMP unreachable errors in all cases, something that one probably does not want to do. For instance, I *much* prefer to have telnet attempts abort quickly with a "network unreachable" than with a "connection timed out" some 60 seconds later. On the other hand, once a connection has been established, I'd prefer stray ICMP errors not break a connection. Moreover, nuking ICMP unreachable errors weakens utilities like ping that understand such messages. One of ping's useful features is the printing of ICMP errors it receives. The following patch (perhaps not pretty, but precise) treats ICMP unreachable errors as before, except that they won't break established connections. Thomas *** /tmp/,RCSt1025442 Sat Feb 25 13:46:58 1989 --- /tmp/,RCSt2025442 Sat Feb 25 13:46:59 1989 *************** *** 258,264 **** tcp_notify(inp) register struct inpcb *inp; { ! wakeup((caddr_t) &inp->inp_socket->so_timeo); sorwakeup(inp->inp_socket); sowwakeup(inp->inp_socket); --- 258,271 ---- tcp_notify(inp) register struct inpcb *inp; { ! if (inp->inp_socket->so_state != SS_ISCONNECTING) { ! register int error = inp->inp_socket->so_error; ! if ((error == EHOSTUNREACH) || (error == ENETUNREACH) ! || (error == EHOSTDOWN)) { ! inp->inp_socket->so_error = 0; /* clear error */ ! return; ! } ! } wakeup((caddr_t) &inp->inp_socket->so_timeo); sorwakeup(inp->inp_socket); sowwakeup(inp->inp_socket);