[PATCH] Report failed connect() with SIGIO

From: Julian Anastasov (uli@linux.tu-varna.acad.bg)
Date: Thu Feb 24 2000 - 08:52:32 EST


        Hello,

        In Linux Kernel 2.2.15pre9 failed connect() must be
reported to the SIGIO users. Here is a patch which solves the
problem. Is this fix required for 2.3 too (add POLL_OUT as 3th
arg)?

--- linux/net/ipv4/tcp_input.c.orig Wed Feb 23 17:29:08 2000
+++ linux/net/ipv4/tcp_input.c Thu Feb 24 15:15:42 2000
@@ -297,8 +297,12 @@
                 sk->num = 0;
         }
         sk->shutdown = SHUTDOWN_MASK;
- if (!sk->dead)
+ if (!sk->dead) {
                 sk->state_change(sk);
+ if (orig_state == TCP_SYN_SENT) {
+ sock_wake_async(sk->socket, 0);
+ }
+ }
 }

 /* This tags the retransmission queue when SACKs arrive. */

Regards

--
Julian Anastasov <uli@linux.tu-varna.acad.bg>

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Feb 29 2000 - 21:00:10 EST