Commit 01c7a9c2 authored by Patrick Caulfield's avatar Patrick Caulfield Committed by David S. Miller

[DECNET]: Connect hang bugfix

This patch fixes a bug in the DECnet connect that seems to have been in 2.6 for
a while now.

If a connection is rejected by a remote host (eg invalid access control, no
such object etc) the Linux end hangs in connect() because it is only waiting for
the socket to go into RUN state.

This patch sets the ECONNREFUSED error state on the socket when the connection
is rejected to that the connect() exits it's wait loop and returns the error to
the user.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6c8994c3
......@@ -419,6 +419,7 @@ static void dn_nsp_disc_init(struct sock *sk, struct sk_buff *skb)
case DN_CI:
case DN_CD:
scp->state = DN_RJ;
sk->sk_err = ECONNREFUSED;
break;
case DN_RUN:
sk->sk_shutdown |= SHUTDOWN_MASK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment