From: Stephen Hemminger Date: Fri, 20 Jun 2008 19:37:42 +0000 (-0700) Subject: Neighbor cache timer is in user hz X-Git-Tag: v2.6.26~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a34d291449fc799048d2d56edcbeaedf1483fb1;p=thirdparty%2Fiproute2.git Neighbor cache timer is in user hz All timer values from kernel are supposed to be in constant units or user hz value. --- diff --git a/ip/ipneigh.c b/ip/ipneigh.c index 03a176056..fa0e41dc0 100644 --- a/ip/ipneigh.c +++ b/ip/ipneigh.c @@ -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,