netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ying Xue <ying.xue@windriver.com>
To: <erik.hugne@ericsson.com>, <richard.alpe@ericsson.com>,
	<jon.maloy@ericsson.com>, <netdev@vger.kernel.org>
Cc: <tipc-discussion@lists.sourceforge.net>
Subject: Re: [PATCH net-next 2/3] tipc: do not report -EHOSTUNREACH for failed local delivery
Date: Wed, 18 Mar 2015 17:41:47 +0800	[thread overview]
Message-ID: <5509485B.1090708@windriver.com> (raw)
In-Reply-To: <1426670263-30358-3-git-send-email-erik.hugne@ericsson.com>

On 03/18/2015 05:17 PM, erik.hugne@ericsson.com wrote:
> From: Erik Hugne <erik.hugne@ericsson.com>
> 
> Since commit 1186adf7df04 ("tipc: simplify message forwarding and
> rejection in socket layer") -EHOSTUNREACH is propagated back to
> the sending process if we fail to deliver the message to another
> socket local to the node.
> This is wrong, host unreachable should only be reported when the
> destination port/name does not exist in the cluster, and that
> check is always done before sending the message. Also, this
> introduces inconsistent sendmsg() behavior for local/remote
> destinations. Errors occurring on the receiving side should not
> trickle up to the sender. If message delivery fails TIPC should
> either discard the packet or reject it back to the sender based
> on the destination droppable option.
> 
> Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>

Acked-by: Ying Xue <ying.xue@windriver.com>

> ---
>  net/tipc/link.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/net/tipc/link.c b/net/tipc/link.c
> index bc49120..8c98c4d 100644
> --- a/net/tipc/link.c
> +++ b/net/tipc/link.c
> @@ -845,8 +845,10 @@ int tipc_link_xmit(struct net *net, struct sk_buff_head *list, u32 dnode,
>  	if (link)
>  		return rc;
>  
> -	if (likely(in_own_node(net, dnode)))
> -		return tipc_sk_rcv(net, list);
> +	if (likely(in_own_node(net, dnode))) {
> +		tipc_sk_rcv(net, list);
> +		return 0;
> +	}
>  
>  	__skb_queue_purge(list);
>  	return rc;
> 

  reply	other threads:[~2015-03-18  9:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-18  9:17 [PATCH net-next 0/3] tipc: small bugfix an support for datagram connect() erik.hugne
2015-03-18  9:17 ` [PATCH net-next 1/3] tipc: remove redundant call to tipc_node_remove_conn erik.hugne
2015-03-18  9:41   ` Ying Xue
2015-03-18 15:27   ` Jon Maloy
2015-03-18  9:17 ` [PATCH net-next 2/3] tipc: do not report -EHOSTUNREACH for failed local delivery erik.hugne
2015-03-18  9:41   ` Ying Xue [this message]
2015-03-18 15:28   ` Jon Maloy
2015-03-18  9:17 ` [PATCH net-next 3/3] tipc: add support for connect() on dgram/rdm sockets erik.hugne
2015-03-18 18:48   ` David 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=5509485B.1090708@windriver.com \
    --to=ying.xue@windriver.com \
    --cc=erik.hugne@ericsson.com \
    --cc=jon.maloy@ericsson.com \
    --cc=netdev@vger.kernel.org \
    --cc=richard.alpe@ericsson.com \
    --cc=tipc-discussion@lists.sourceforge.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).