From c13f598242dd2b108016367ab318f15b0cf4db44 Mon Sep 17 00:00:00 2001 From: Christoph Biedl Date: Wed, 20 Jul 2011 16:02:50 -0700 Subject: [PATCH] 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. --- ip/ipprefix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/ipprefix.c b/ip/ipprefix.c index cb1f5822..d8327beb 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);