Commit d9ba887e authored by Eric Dumazet's avatar Eric Dumazet Committed by Stephen Hemminger

ss: take care of unknown min_rtt

Kernel sets info->tcpi_min_rtt to ~0U when no RTT sample was ever
taken for the session, thus min_rtt is unknown.
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
parent e56a959e
...@@ -2019,7 +2019,8 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r, ...@@ -2019,7 +2019,8 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r,
s.segs_out = info->tcpi_segs_out; s.segs_out = info->tcpi_segs_out;
s.segs_in = info->tcpi_segs_in; s.segs_in = info->tcpi_segs_in;
s.not_sent = info->tcpi_notsent_bytes; s.not_sent = info->tcpi_notsent_bytes;
s.min_rtt = (double) info->tcpi_min_rtt / 1000; if (info->tcpi_min_rtt && info->tcpi_min_rtt != ~0U)
s.min_rtt = (double) info->tcpi_min_rtt / 1000;
tcp_stats_print(&s); tcp_stats_print(&s);
free(s.dctcp); free(s.dctcp);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment