]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: failed transmissions should return error
authorErik Hugne <erik.hugne@ericsson.com>
Wed, 19 Feb 2014 07:37:58 +0000 (08:37 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Feb 2014 21:40:57 +0000 (16:40 -0500)
commit89b5ff2f6d3e81afda7b336dd8a5f011fddd19e0
tree1ccb3537b09f42c0fffe9542ffb693c7bd1f75e8
parentf53b9fac901158ebe1e380846862e7d9af12c6fe
tipc: failed transmissions should return error

When a message could not be sent out because the destination node
or link could not be found, the full message size is returned from
sendmsg() as if it had been sent successfully. An application will
then get a false indication that it's making forward progress. This
problem has existed since the initial commit in 2.6.16.

We change this to return -ENETUNREACH if the message cannot be
delivered due to the destination node/link being unavailable. We
also get rid of the redundant tipc_reject_msg call since freeing
the buffer and doing a tipc_port_iovec_reject accomplishes exactly
the same thing.

Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/link.c