From: Christoph Biedl Date: Wed, 20 Jul 2011 23:02:50 +0000 (-0700) Subject: ip: fix display of prefix cache info X-Git-Tag: v3.0.0~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c13f598242dd2b108016367ab318f15b0cf4db44;p=thirdparty%2Fiproute2.git ip: fix display of prefix cache info The "ip monitor" command does properly decode the "preferred" and "valid" lifetime records in router advertisements from netlink messages. --- diff --git a/ip/ipprefix.c b/ip/ipprefix.c index cb1f58223..d8327beb0 100644 --- a/ip/ipprefix.c +++ b/ip/ipprefix.c @@ -92,7 +92,7 @@ int print_prefix(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) if (tb[PREFIX_CACHEINFO]) { struct prefix_cacheinfo *pc; - pc = (struct prefix_cacheinfo *)tb[PREFIX_CACHEINFO]; + pc = (struct prefix_cacheinfo *)RTA_DATA(tb[PREFIX_CACHEINFO]); fprintf(fp, "valid %u ", pc->valid_time); fprintf(fp, "preferred %u ", pc->preferred_time);