aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 32a0ebc589d5..97bbf595230d 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1409,13 +1409,14 @@ struct tcp_func ipv4_specific = {
1409 */ 1409 */
1410static int tcp_v4_init_sock(struct sock *sk) 1410static int tcp_v4_init_sock(struct sock *sk)
1411{ 1411{
1412 struct inet_connection_sock *icsk = inet_csk(sk);
1412 struct tcp_sock *tp = tcp_sk(sk); 1413 struct tcp_sock *tp = tcp_sk(sk);
1413 1414
1414 skb_queue_head_init(&tp->out_of_order_queue); 1415 skb_queue_head_init(&tp->out_of_order_queue);
1415 tcp_init_xmit_timers(sk); 1416 tcp_init_xmit_timers(sk);
1416 tcp_prequeue_init(tp); 1417 tcp_prequeue_init(tp);
1417 1418
1418 inet_csk(sk)->icsk_rto = TCP_TIMEOUT_INIT; 1419 icsk->icsk_rto = TCP_TIMEOUT_INIT;
1419 tp->mdev = TCP_TIMEOUT_INIT; 1420 tp->mdev = TCP_TIMEOUT_INIT;
1420 1421
1421 /* So many TCP implementations out there (incorrectly) count the 1422 /* So many TCP implementations out there (incorrectly) count the
@@ -1433,7 +1434,7 @@ static int tcp_v4_init_sock(struct sock *sk)
1433 tp->mss_cache = 536; 1434 tp->mss_cache = 536;
1434 1435
1435 tp->reordering = sysctl_tcp_reordering; 1436 tp->reordering = sysctl_tcp_reordering;
1436 tp->ca_ops = &tcp_init_congestion_ops; 1437 icsk->icsk_ca_ops = &tcp_init_congestion_ops;
1437 1438
1438 sk->sk_state = TCP_CLOSE; 1439 sk->sk_state = TCP_CLOSE;
1439 1440
@@ -1456,7 +1457,7 @@ int tcp_v4_destroy_sock(struct sock *sk)
1456 1457
1457 tcp_clear_xmit_timers(sk); 1458 tcp_clear_xmit_timers(sk);
1458 1459
1459 tcp_cleanup_congestion_control(tp); 1460 tcp_cleanup_congestion_control(sk);
1460 1461
1461 /* Cleanup up the write buffer. */ 1462 /* Cleanup up the write buffer. */
1462 sk_stream_writequeue_purge(sk); 1463 sk_stream_writequeue_purge(sk);
@@ -1883,7 +1884,7 @@ static void get_tcp4_sock(struct sock *sp, char *tmpbuf, int i)
1883 jiffies_to_clock_t(timer_expires - jiffies), 1884 jiffies_to_clock_t(timer_expires - jiffies),
1884 icsk->icsk_retransmits, 1885 icsk->icsk_retransmits,
1885 sock_i_uid(sp), 1886 sock_i_uid(sp),
1886 tp->probes_out, 1887 icsk->icsk_probes_out,
1887 sock_i_ino(sp), 1888 sock_i_ino(sp),
1888 atomic_read(&sp->sk_refcnt), sp, 1889 atomic_read(&sp->sk_refcnt), sp,
1889 icsk->icsk_rto, 1890 icsk->icsk_rto,