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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index eccb7165a80c..60c28add96b8 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1681,7 +1681,7 @@ void tcp_set_state(struct sock *sk, int state)
1681 inet_put_port(sk); 1681 inet_put_port(sk);
1682 /* fall through */ 1682 /* fall through */
1683 default: 1683 default:
1684 if (oldstate==TCP_ESTABLISHED) 1684 if (oldstate == TCP_ESTABLISHED)
1685 TCP_DEC_STATS(sock_net(sk), TCP_MIB_CURRESTAB); 1685 TCP_DEC_STATS(sock_net(sk), TCP_MIB_CURRESTAB);
1686 } 1686 }
1687 1687
@@ -1691,7 +1691,7 @@ void tcp_set_state(struct sock *sk, int state)
1691 sk->sk_state = state; 1691 sk->sk_state = state;
1692 1692
1693#ifdef STATE_TRACE 1693#ifdef STATE_TRACE
1694 SOCK_DEBUG(sk, "TCP sk=%p, State %s -> %s\n",sk, statename[oldstate],statename[state]); 1694 SOCK_DEBUG(sk, "TCP sk=%p, State %s -> %s\n", sk, statename[oldstate], statename[state]);
1695#endif 1695#endif
1696} 1696}
1697EXPORT_SYMBOL_GPL(tcp_set_state); 1697EXPORT_SYMBOL_GPL(tcp_set_state);
@@ -2651,7 +2651,7 @@ EXPORT_SYMBOL(tcp_md5_hash_key);
2651 2651
2652void tcp_done(struct sock *sk) 2652void tcp_done(struct sock *sk)
2653{ 2653{
2654 if(sk->sk_state == TCP_SYN_SENT || sk->sk_state == TCP_SYN_RECV) 2654 if (sk->sk_state == TCP_SYN_SENT || sk->sk_state == TCP_SYN_RECV)
2655 TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_ATTEMPTFAILS); 2655 TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_ATTEMPTFAILS);
2656 2656
2657 tcp_set_state(sk, TCP_CLOSE); 2657 tcp_set_state(sk, TCP_CLOSE);