summaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorErik Hugne <erik.hugne@ericsson.com>2015-03-19 09:02:18 +0100
committerDavid S. Miller <davem@davemloft.net>2015-03-19 12:25:54 -0400
commit3bd88ee7a2ea19dffe384e12fe452c59d9e53c29 (patch)
tree9ff5ff1920bb009e331f63d5e3c05a35b42f48c3 /net/tipc
parent18d6c58415fa9f5ec98767a2434acc8197c7f288 (diff)
downloadop-kernel-dev-3bd88ee7a2ea19dffe384e12fe452c59d9e53c29.zip
op-kernel-dev-3bd88ee7a2ea19dffe384e12fe452c59d9e53c29.tar.gz
tipc: do not report -EHOSTUNREACH for failed local delivery
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> Acked-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/link.c6
1 files 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;
OpenPOWER on IntegriCloud