• Erik Hugne's avatar
    tipc: failed transmissions should return error · 63fa01c1
    Erik Hugne authored
    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: default avatarErik Hugne <erik.hugne@ericsson.com>
    Reviewed-by: default avatarJon Maloy <jon.maloy@ericsson.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    63fa01c1
link.c 74.4 KB