From: Andreas Henriksson <andreas@fatal.se>
To: shemminger@vyatta.com
Cc: netdev@vger.kernel.org,
Christoph Biedl <debian.axhn@manchmal.in-ulm.de>,
Andreas Henriksson <andreas@fatal.se>
Subject: [PATCH] Fix error decoding router advertisements netlink messages
Date: Wed, 20 Jul 2011 10:41:21 +0200 [thread overview]
Message-ID: <1311151281-25479-1-git-send-email-andreas@fatal.se> (raw)
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
next reply other threads:[~2011-07-20 8:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-20 8:41 Andreas Henriksson [this message]
2011-07-20 23:04 ` [PATCH] Fix error decoding router advertisements netlink messages Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1311151281-25479-1-git-send-email-andreas@fatal.se \
--to=andreas@fatal.se \
--cc=debian.axhn@manchmal.in-ulm.de \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).