* [PATCH] Fix error decoding router advertisements netlink messages
@ 2011-07-20 8:41 Andreas Henriksson
2011-07-20 23:04 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Henriksson @ 2011-07-20 8:41 UTC (permalink / raw)
To: shemminger; +Cc: netdev, Christoph Biedl, Andreas Henriksson
From: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
The "ip monitor" command does properly decode the "preferred" and
"valid" lifetime records in router advertisements from netlink
messages.
For more details see http://bugs.debian.org/634170
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
---
ip/ipprefix.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ip/ipprefix.c b/ip/ipprefix.c
index cb1f582..d8327be 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);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-20 23:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-20 8:41 [PATCH] Fix error decoding router advertisements netlink messages Andreas Henriksson
2011-07-20 23:04 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).