summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/tcp.h4
-rw-r--r--net/ipv4/tcp_input.c6
-rw-r--r--net/ipv4/tcp_minisocks.c2
-rw-r--r--net/ipv4/tcp_output.c2
-rw-r--r--net/ipv4/tcp_timer.c2
5 files changed, 8 insertions, 8 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index feba4c0406e5..5b2932b8363f 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1307,8 +1307,8 @@ static inline u32 keepalive_time_elapsed(const struct tcp_sock *tp)
1307{ 1307{
1308 const struct inet_connection_sock *icsk = &tp->inet_conn; 1308 const struct inet_connection_sock *icsk = &tp->inet_conn;
1309 1309
1310 return min_t(u32, tcp_time_stamp - icsk->icsk_ack.lrcvtime, 1310 return min_t(u32, tcp_jiffies32 - icsk->icsk_ack.lrcvtime,
1311 tcp_time_stamp - tp->rcv_tstamp); 1311 tcp_jiffies32 - tp->rcv_tstamp);
1312} 1312}
1313 1313
1314static inline int tcp_fin_time(const struct sock *sk) 1314static inline int tcp_fin_time(const struct sock *sk)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 6a15c9b80b09..eeb4967df25a 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -672,7 +672,7 @@ static void tcp_event_data_recv(struct sock *sk, struct sk_buff *skb)
672 672
673 tcp_rcv_rtt_measure(tp); 673 tcp_rcv_rtt_measure(tp);
674 674
675 now = tcp_time_stamp; 675 now = tcp_jiffies32;
676 676
677 if (!icsk->icsk_ack.ato) { 677 if (!icsk->icsk_ack.ato) {
678 /* The _first_ data packet received, initialize 678 /* The _first_ data packet received, initialize
@@ -3636,7 +3636,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
3636 */ 3636 */
3637 sk->sk_err_soft = 0; 3637 sk->sk_err_soft = 0;
3638 icsk->icsk_probes_out = 0; 3638 icsk->icsk_probes_out = 0;
3639 tp->rcv_tstamp = tcp_time_stamp; 3639 tp->rcv_tstamp = tcp_jiffies32;
3640 if (!prior_packets) 3640 if (!prior_packets)
3641 goto no_queue; 3641 goto no_queue;
3642 3642
@@ -5554,7 +5554,7 @@ void tcp_finish_connect(struct sock *sk, struct sk_buff *skb)
5554 struct inet_connection_sock *icsk = inet_csk(sk); 5554 struct inet_connection_sock *icsk = inet_csk(sk);
5555 5555
5556 tcp_set_state(sk, TCP_ESTABLISHED); 5556 tcp_set_state(sk, TCP_ESTABLISHED);
5557 icsk->icsk_ack.lrcvtime = tcp_time_stamp; 5557 icsk->icsk_ack.lrcvtime = tcp_jiffies32;
5558 5558
5559 if (skb) { 5559 if (skb) {
5560 icsk->icsk_af_ops->sk_rx_dst_set(sk, skb); 5560 icsk->icsk_af_ops->sk_rx_dst_set(sk, skb);
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
index 717be4de5324..59c32e0086c0 100644
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -447,7 +447,7 @@ struct sock *tcp_create_openreq_child(const struct sock *sk,
447 newtp->mdev_us = jiffies_to_usecs(TCP_TIMEOUT_INIT); 447 newtp->mdev_us = jiffies_to_usecs(TCP_TIMEOUT_INIT);
448 minmax_reset(&newtp->rtt_min, tcp_time_stamp, ~0U); 448 minmax_reset(&newtp->rtt_min, tcp_time_stamp, ~0U);
449 newicsk->icsk_rto = TCP_TIMEOUT_INIT; 449 newicsk->icsk_rto = TCP_TIMEOUT_INIT;
450 newicsk->icsk_ack.lrcvtime = tcp_time_stamp; 450 newicsk->icsk_ack.lrcvtime = tcp_jiffies32;
451 451
452 newtp->packets_out = 0; 452 newtp->packets_out = 0;
453 newtp->retrans_out = 0; 453 newtp->retrans_out = 0;
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 4bd50f0b236b..cbda5de16449 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -3324,7 +3324,7 @@ static void tcp_connect_init(struct sock *sk)
3324 if (likely(!tp->repair)) 3324 if (likely(!tp->repair))
3325 tp->rcv_nxt = 0; 3325 tp->rcv_nxt = 0;
3326 else 3326 else
3327 tp->rcv_tstamp = tcp_time_stamp; 3327 tp->rcv_tstamp = tcp_jiffies32;
3328 tp->rcv_wup = tp->rcv_nxt; 3328 tp->rcv_wup = tp->rcv_nxt;
3329 tp->copied_seq = tp->rcv_nxt; 3329 tp->copied_seq = tp->rcv_nxt;
3330 3330
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index 5f6f219a431e..9e0616cb8c17 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -451,7 +451,7 @@ void tcp_retransmit_timer(struct sock *sk)
451 tp->snd_una, tp->snd_nxt); 451 tp->snd_una, tp->snd_nxt);
452 } 452 }
453#endif 453#endif
454 if (tcp_time_stamp - tp->rcv_tstamp > TCP_RTO_MAX) { 454 if (tcp_jiffies32 - tp->rcv_tstamp > TCP_RTO_MAX) {
455 tcp_write_err(sk); 455 tcp_write_err(sk);
456 goto out; 456 goto out;
457 } 457 }