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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index cf4555581282..40ba4249a586 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2322,6 +2322,7 @@ int tcp_disconnect(struct sock *sk, int flags)
2322 tcp_init_send_head(sk); 2322 tcp_init_send_head(sk);
2323 memset(&tp->rx_opt, 0, sizeof(tp->rx_opt)); 2323 memset(&tp->rx_opt, 0, sizeof(tp->rx_opt));
2324 __sk_dst_reset(sk); 2324 __sk_dst_reset(sk);
2325 tcp_saved_syn_free(tp);
2325 2326
2326 /* Clean up fastopen related fields */ 2327 /* Clean up fastopen related fields */
2327 tcp_free_fastopen_req(tp); 2328 tcp_free_fastopen_req(tp);
@@ -2770,7 +2771,7 @@ void tcp_get_info(struct sock *sk, struct tcp_info *info)
2770{ 2771{
2771 const struct tcp_sock *tp = tcp_sk(sk); /* iff sk_type == SOCK_STREAM */ 2772 const struct tcp_sock *tp = tcp_sk(sk); /* iff sk_type == SOCK_STREAM */
2772 const struct inet_connection_sock *icsk = inet_csk(sk); 2773 const struct inet_connection_sock *icsk = inet_csk(sk);
2773 u32 now = tcp_time_stamp, intv; 2774 u32 now, intv;
2774 u64 rate64; 2775 u64 rate64;
2775 bool slow; 2776 bool slow;
2776 u32 rate; 2777 u32 rate;
@@ -2839,6 +2840,7 @@ void tcp_get_info(struct sock *sk, struct tcp_info *info)
2839 info->tcpi_retrans = tp->retrans_out; 2840 info->tcpi_retrans = tp->retrans_out;
2840 info->tcpi_fackets = tp->fackets_out; 2841 info->tcpi_fackets = tp->fackets_out;
2841 2842
2843 now = tcp_time_stamp;
2842 info->tcpi_last_data_sent = jiffies_to_msecs(now - tp->lsndtime); 2844 info->tcpi_last_data_sent = jiffies_to_msecs(now - tp->lsndtime);
2843 info->tcpi_last_data_recv = jiffies_to_msecs(now - icsk->icsk_ack.lrcvtime); 2845 info->tcpi_last_data_recv = jiffies_to_msecs(now - icsk->icsk_ack.lrcvtime);
2844 info->tcpi_last_ack_recv = jiffies_to_msecs(now - tp->rcv_tstamp); 2846 info->tcpi_last_ack_recv = jiffies_to_msecs(now - tp->rcv_tstamp);