diff options
Diffstat (limited to 'net/ipv4/tcp_timer.c')
-rw-r--r-- | net/ipv4/tcp_timer.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index 8a0ab2977f1f..808bb920c9f5 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c | |||
@@ -41,7 +41,6 @@ void tcp_init_xmit_timers(struct sock *sk) | |||
41 | inet_csk_init_xmit_timers(sk, &tcp_write_timer, &tcp_delack_timer, | 41 | inet_csk_init_xmit_timers(sk, &tcp_write_timer, &tcp_delack_timer, |
42 | &tcp_keepalive_timer); | 42 | &tcp_keepalive_timer); |
43 | } | 43 | } |
44 | |||
45 | EXPORT_SYMBOL(tcp_init_xmit_timers); | 44 | EXPORT_SYMBOL(tcp_init_xmit_timers); |
46 | 45 | ||
47 | static void tcp_write_err(struct sock *sk) | 46 | static void tcp_write_err(struct sock *sk) |
@@ -172,14 +171,14 @@ static int tcp_write_timeout(struct sock *sk) | |||
172 | 171 | ||
173 | if ((1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV)) { | 172 | if ((1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV)) { |
174 | if (icsk->icsk_retransmits) | 173 | if (icsk->icsk_retransmits) |
175 | dst_negative_advice(&sk->sk_dst_cache, sk); | 174 | dst_negative_advice(sk); |
176 | retry_until = icsk->icsk_syn_retries ? : sysctl_tcp_syn_retries; | 175 | retry_until = icsk->icsk_syn_retries ? : sysctl_tcp_syn_retries; |
177 | } else { | 176 | } else { |
178 | if (retransmits_timed_out(sk, sysctl_tcp_retries1)) { | 177 | if (retransmits_timed_out(sk, sysctl_tcp_retries1)) { |
179 | /* Black hole detection */ | 178 | /* Black hole detection */ |
180 | tcp_mtu_probing(icsk, sk); | 179 | tcp_mtu_probing(icsk, sk); |
181 | 180 | ||
182 | dst_negative_advice(&sk->sk_dst_cache, sk); | 181 | dst_negative_advice(sk); |
183 | } | 182 | } |
184 | 183 | ||
185 | retry_until = sysctl_tcp_retries2; | 184 | retry_until = sysctl_tcp_retries2; |
@@ -517,7 +516,7 @@ static void tcp_keepalive_timer (unsigned long data) | |||
517 | struct sock *sk = (struct sock *) data; | 516 | struct sock *sk = (struct sock *) data; |
518 | struct inet_connection_sock *icsk = inet_csk(sk); | 517 | struct inet_connection_sock *icsk = inet_csk(sk); |
519 | struct tcp_sock *tp = tcp_sk(sk); | 518 | struct tcp_sock *tp = tcp_sk(sk); |
520 | __u32 elapsed; | 519 | u32 elapsed; |
521 | 520 | ||
522 | /* Only process if socket is not in use. */ | 521 | /* Only process if socket is not in use. */ |
523 | bh_lock_sock(sk); | 522 | bh_lock_sock(sk); |
@@ -554,7 +553,7 @@ static void tcp_keepalive_timer (unsigned long data) | |||
554 | if (tp->packets_out || tcp_send_head(sk)) | 553 | if (tp->packets_out || tcp_send_head(sk)) |
555 | goto resched; | 554 | goto resched; |
556 | 555 | ||
557 | elapsed = tcp_time_stamp - tp->rcv_tstamp; | 556 | elapsed = keepalive_time_elapsed(tp); |
558 | 557 | ||
559 | if (elapsed >= keepalive_time_when(tp)) { | 558 | if (elapsed >= keepalive_time_when(tp)) { |
560 | if (icsk->icsk_probes_out >= keepalive_probes(tp)) { | 559 | if (icsk->icsk_probes_out >= keepalive_probes(tp)) { |