[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <521F62AE.40101@windriver.com>
Date: Thu, 29 Aug 2013 11:03:10 -0400
From: Paul Gortmaker <paul.gortmaker@...driver.com>
To: <erik.hugne@...csson.com>
CC: <netdev@...r.kernel.org>, <ying.xue@...driver.com>,
<jon.maloy@...csson.com>, <tipc-discussion@...ts.sourceforge.net>,
<nhan.tt.vo@...tech.com.au>
Subject: Re: [PATCH v2] tipc: set sk_err correctly when connection fails
On 13-08-28 03:29 AM, erik.hugne@...csson.com wrote:
> From: Erik Hugne <erik.hugne@...csson.com>
>
> Should a connect fail, if the publication/server is unavailable or
> due to some other error, a positive value will be returned and errno
> is never set. If the application code checks for an explicit zero
> return from connect (success) or a negative return (failure), it
> will not catch the error and subsequent send() calls will fail as
> shown from the strace snippet below.
>
> socket(0x1e /* PF_??? */, SOCK_SEQPACKET, 0) = 3
> connect(3, {sa_family=0x1e /* AF_??? */, sa_data="\2\1\322\4\0\0\322\4\0\0\0\0\0\0"}, 16) = 111
> sendto(3, "test", 4, 0, NULL, 0) = -1 EPIPE (Broken pipe)
>
> The reason for this behaviour is that TIPC wrongly inverts error
> codes set in sk_err.
>
> Signed-off-by: Erik Hugne <erik.hugne@...csson.com>
> ---
>
> [v2: add more details to commit message]
Thanks -- this now conveys the required triplet: 1) user visible symptom,
2) underlying technical cause, and 3) the why and how of the fix.
Paul.
--
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists