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.
This commit is contained in:
Christoph Biedl 2011-07-20 16:02:50 -07:00 committed by Stephen Hemminger
parent c441bd4c1b
commit c13f598242

View File

@ -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);