From: Patrick Caulfield <pcaulfie@redhat.com>
To: davem@redhat.com
Cc: linux-kernel@vger.kernel.org,
DECnet list <linux-decnet-user@lists.sourceforge.net>
Subject: [PATCH] DECnet connect hang bugfix
Date: Sun, 24 Oct 2004 12:11:57 +0100 [thread overview]
Message-ID: <20041024111157.GA31630@tykepenguin.com> (raw)
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
next reply other threads:[~2004-10-24 11:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-24 11:11 Patrick Caulfield [this message]
2004-10-26 3:36 ` [PATCH] DECnet connect hang bugfix David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041024111157.GA31630@tykepenguin.com \
--to=pcaulfie@redhat.com \
--cc=davem@redhat.com \
--cc=linux-decnet-user@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.