patch-2.3.27 linux/net/ipv4/tcp_input.c

Next file: linux/net/irda/irmod.c
Previous file: linux/net/core/dev.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.26/linux/net/ipv4/tcp_input.c linux/net/ipv4/tcp_input.c
@@ -1401,11 +1401,6 @@
 
 	tcp_send_ack(sk);
 
-	if (!sk->dead) {
-		wake_up_interruptible(sk->sleep);
-		sock_wake_async(sk->socket, 1, POLL_HUP);
-	}
-
 	switch(sk->state) {
 		case TCP_SYN_RECV:
 		case TCP_ESTABLISHED:
@@ -1440,7 +1435,11 @@
 			 */
 			printk("tcp_fin: Impossible, sk->state=%d\n", sk->state);
 			break;
-	};
+	}
+	if (!sk->dead) {
+		wake_up_interruptible(sk->sleep);
+		sock_wake_async(sk->socket, 1, POLL_HUP);
+	}
 }
 
 /* These routines update the SACK block as out-of-order packets arrive or

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)