diff options
author | David S. Miller <davem@davemloft.net> | 2015-06-14 08:56:52 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-14 08:56:52 +0200 |
commit | 25c43bf13b1657d9a2f6a2565e9159ce31517aa5 (patch) | |
tree | c1fef736d3227dbd3788206c746d00763247f232 /net/tipc | |
parent | tcp: tcp_v6_connect() cleanup (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff) | |
download | linux-25c43bf13b1657d9a2f6a2565e9159ce31517aa5.tar.xz linux-25c43bf13b1657d9a2f6a2565e9159ce31517aa5.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/socket.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 30ea82a9b0f1..46b6ed534ef2 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -2140,11 +2140,17 @@ static void tipc_sk_timeout(unsigned long data) peer_node = tsk_peer_node(tsk); if (tsk->probing_state == TIPC_CONN_PROBING) { - /* Previous probe not answered -> self abort */ - skb = tipc_msg_create(TIPC_CRITICAL_IMPORTANCE, - TIPC_CONN_MSG, SHORT_H_SIZE, 0, - own_node, peer_node, tsk->portid, - peer_port, TIPC_ERR_NO_PORT); + if (!sock_owned_by_user(sk)) { + sk->sk_socket->state = SS_DISCONNECTING; + tsk->connected = 0; + tipc_node_remove_conn(sock_net(sk), tsk_peer_node(tsk), + tsk_peer_port(tsk)); + sk->sk_state_change(sk); + } else { + /* Try again later */ + sk_reset_timer(sk, &sk->sk_timer, (HZ / 20)); + } + } else { skb = tipc_msg_create(CONN_MANAGER, CONN_PROBE, INT_H_SIZE, 0, peer_node, own_node, |