]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: do not report -EHOSTUNREACH for failed local delivery
authorErik Hugne <erik.hugne@ericsson.com>
Thu, 19 Mar 2015 08:02:18 +0000 (09:02 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Mar 2015 16:25:54 +0000 (12:25 -0400)
commit29122e49cb672002db1a0363c8e26f7cc1d62625
tree9ff5ff1920bb009e331f63d5e3c05a35b42f48c3
parent35fee1d724d5e64712949ad6a9f1b6aeb03518a1
tipc: do not report -EHOSTUNREACH for failed local delivery

Since commit 6e45fae7a06d ("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>
net/tipc/link.c