]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
Neighbor cache timer is in user hz
authorStephen Hemminger <stephen.hemminger@vyatta.com>
Fri, 20 Jun 2008 19:37:42 +0000 (12:37 -0700)
committerStephen Hemminger <stephen.hemminger@vyatta.com>
Fri, 20 Jun 2008 19:37:42 +0000 (12:37 -0700)
All timer values from kernel are supposed to be in constant
units or user hz value.

ip/ipneigh.c

index 03a1760567aa548fc051847d8c43f3f03da3e58b..fa0e41dc07b434aae4a98e0b82ca3d2885ee06b5 100644 (file)
@@ -272,10 +272,9 @@ int print_neigh(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
                fprintf(fp, " router");
        }
        if (tb[NDA_CACHEINFO] && show_stats) {
-               static int hz;
                struct nda_cacheinfo *ci = RTA_DATA(tb[NDA_CACHEINFO]);
-               if (!hz)
-                       hz = get_hz();
+               int hz = get_user_hz();
+
                if (ci->ndm_refcnt)
                        printf(" ref %d", ci->ndm_refcnt);
                fprintf(fp, " used %d/%d/%d", ci->ndm_used/hz,