]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
use correct hz for rto,ato
authorStephen Hemminger <stephen.hemminger@vyatta.com>
Fri, 20 Jun 2008 19:34:15 +0000 (12:34 -0700)
committerStephen Hemminger <stephen.hemminger@vyatta.com>
Fri, 20 Jun 2008 19:34:15 +0000 (12:34 -0700)
The function get_hz() returns the psched hz value which is wrong
for anything other than tc usage. Should be user hz instead, but
kernel is broken (patch sent) and this code doesn't get hit on
current systems (netlink is used first).

misc/ss.c

index 79193e54564838d1dc9af9b647caae49324203be..9086db07a28abbeaa0d0f4574ea385fd9a7acdb5 100644 (file)
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -1191,10 +1191,11 @@ static int tcp_show_line(char *line, const struct filter *f, int family)
                }
        }
        if (show_tcpinfo) {
-               if (s.rto && s.rto != 3*get_hz())
-                       printf(" rto:%g", (double)s.rto/get_hz());
+               int hz = get_user_hz();
+               if (s.rto && s.rto != 3*hz)
+                       printf(" rto:%g", (double)s.rto/hz);
                if (s.ato)
-                       printf(" ato:%g", (double)s.ato/get_hz());
+                       printf(" ato:%g", (double)s.ato/hz);
                if (s.cwnd != 2)
                        printf(" cwnd:%d", s.cwnd);
                if (s.ssthresh != -1)