* [PATCH] DECnet connect hang bugfix
@ 2004-10-24 11:11 Patrick Caulfield
2004-10-26 3:36 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Patrick Caulfield @ 2004-10-24 11:11 UTC (permalink / raw)
To: davem; +Cc: linux-kernel, DECnet list
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 =====
--- 1.14/net/decnet/dn_nsp_in.c 2004-06-28 21:14:20 +01:00
+++ edited/dn_nsp_in.c 2004-10-14 13:44:23 +01:00
@@ -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;
--
patrick
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] DECnet connect hang bugfix
2004-10-24 11:11 [PATCH] DECnet connect hang bugfix Patrick Caulfield
@ 2004-10-26 3:36 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2004-10-26 3:36 UTC (permalink / raw)
To: Patrick Caulfield; +Cc: linux-kernel, linux-decnet-user
On Sun, 24 Oct 2004 12:11:57 +0100
Patrick Caulfield <pcaulfie@redhat.com> wrote:
> 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-10-26 3:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-24 11:11 [PATCH] DECnet connect hang bugfix Patrick Caulfield
2004-10-26 3:36 ` David S. Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.