TCP fixes for 2.2: forget sendmsg OOM, tcp_reset error_report

From: Julian Anastasov <ja@ssi.bg>
Date: 2002-08-23 09:53:53

	Hello,

	Below are two fixes useful for 2.2.22.

	The first fixes SIGIO issue with tcp_reset, stolen from
2.4 - we should send event on error.

	The second one fixes TCP sendmsg problem on OOM (broken
terminals, etc) - we should forget the old error (ENOMEM) and
not to fail with EFAULT.
--- v2.2.21/linux/net/ipv4/tcp_input.c	Sun Nov  4 10:16:16 2001
+++ linux/net/ipv4/tcp_input.c	Thu Aug 22 22:14:23 2002
@@ -296,7 +296,7 @@
 	}
 	sk->shutdown = SHUTDOWN_MASK;
 	if (!sk->dead) 
-		sk->state_change(sk);
+		sk->error_report(sk);
 }
 
 /* This tags the retransmission queue when SACKs arrive. */


--- v2.2.21/linux/net/ipv4/tcp.c	Sun Nov  4 10:16:16 2001
+++ linux/net/ipv4/tcp.c	Thu Aug 22 22:16:02 2002
@@ -940,6 +940,7 @@
 				if (!err) 
 					tcp_push_pending_frames(sk, tp);
 				wait_for_tcp_memory(sk, err);
+				err = 0;
 
 				/* If SACK's were formed or PMTU events happened,
 				 * we must find out about it.

Regards

--
Julian Anastasov [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help