]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
ip: fix display of prefix cache info
authorChristoph Biedl <debian.axhn@manchmal.in-ulm.de>
Wed, 20 Jul 2011 23:02:50 +0000 (16:02 -0700)
committerStephen Hemminger <shemminger@vyatta.com>
Wed, 20 Jul 2011 23:02:50 +0000 (16:02 -0700)
The "ip monitor" command does properly decode the "preferred" and
"valid" lifetime records in router advertisements from netlink
messages.

ip/ipprefix.c

index cb1f582236c27cd923ff7b8531ed896a38b55abb..d8327beb04de088d79b83c0e64ac34bd3c7cc704 100644 (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);