aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 4664733f139c..99ad52c00c96 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2375,6 +2375,23 @@ void __tcp_put_md5sig_pool(void)
2375EXPORT_SYMBOL(__tcp_put_md5sig_pool); 2375EXPORT_SYMBOL(__tcp_put_md5sig_pool);
2376#endif 2376#endif
2377 2377
2378void tcp_done(struct sock *sk)
2379{
2380 if(sk->sk_state == TCP_SYN_SENT || sk->sk_state == TCP_SYN_RECV)
2381 TCP_INC_STATS_BH(TCP_MIB_ATTEMPTFAILS);
2382
2383 tcp_set_state(sk, TCP_CLOSE);
2384 tcp_clear_xmit_timers(sk);
2385
2386 sk->sk_shutdown = SHUTDOWN_MASK;
2387
2388 if (!sock_flag(sk, SOCK_DEAD))
2389 sk->sk_state_change(sk);
2390 else
2391 inet_csk_destroy_sock(sk);
2392}
2393EXPORT_SYMBOL_GPL(tcp_done);
2394
2378extern void __skb_cb_too_small_for_tcp(int, int); 2395extern void __skb_cb_too_small_for_tcp(int, int);
2379extern struct tcp_congestion_ops tcp_reno; 2396extern struct tcp_congestion_ops tcp_reno;
2380 2397