DECnet connect hang bugfix
PATCH 1/1 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.
===== dn_nsp_in.c 1.14 vs edited =====
dn_nsp_in.c renamed from net/decnet/dn_nsp_in.c +1 -0
@@ -419,6 +419,7 @@case DN_CI :case DN_CD : scp->state =DN_RJ ; + sk->sk_err =ECONNREFUSED ;break ;case DN_RUN : sk->sk_shutdown |=SHUTDOWN_MASK ;
Signature · 1 line
patrick
David S. Miller
AppliedQuoted 10 lines · On Sun, 24 Oct 2004 12:11:57 +0100 Patrick Caulfield <[email protected]>…
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.
Applied, thanks Patrick.
Could you please provide proper "Signed-off-by:" lines with future DECNET patches?
Thanks a lot.