Subject: Re: tcp connections lost on interface down
To: Love <lha@stacken.kth.se>
From: Jun-ichiro itojun Hagino <itojun@iijlab.net>
List: current-users
Date: 08/05/2003 18:18:09
	(not sure if it is delivered, so i'll resend)

>> I'm not sure if this is a bug or intentional, but I have noticed that when
>> ppp0 dies (due to disconnect - deliberate or otherwise), all the TCP
>> connections are also lost. I have moved back to the kernel which does not
>> have this problem.
>Apprently its a feature. I don't like it. The idea is fine, I want to know
>when the address of the connected sockets goes away, its just to
>aggressive right now.

	i think so too, it is too aggressive i think (think of DHCP/PPP-based
	fixed address allocation like above).  the following diff should avoid
	the behavior (not tested).  could we at least make it switchable via
	sysctl, or remove this portion?

itojun


Index: in.c
===================================================================
RCS file: /cvsroot/src/sys/netinet/in.c,v
retrieving revision 1.89
diff -u -r1.89 in.c
--- in.c	2003/06/26 03:35:00	1.89
+++ in.c	2003/08/05 01:41:46
@@ -568,6 +568,7 @@
 			IFAREF(&nia->ia_ifa); 
 			LIST_INSERT_HEAD(&nia->ia_inpcbs, inp, inp_ialink);
 		} else if (inp->inp_socket != NULL) {
+#if 0
 			if ((inp->inp_socket->so_state & SS_NOFDREF) &&
 			    inp->inp_socket->so_head == NULL) {
 				soabort(inp->inp_socket);
@@ -576,6 +577,7 @@
 				sorwakeup(inp->inp_socket);
 				sowwakeup(inp->inp_socket);
 			}
+#endif
 		}
 	}