netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* iproute2: prints bogus hoplimit
@ 2009-02-24 10:27 Jan Engelhardt
  2009-03-18 22:12 ` Stephen Hemminger
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Engelhardt @ 2009-02-24 10:27 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev


$ ip -6 r
fc00::/7 dev rtl0  proto kernel  metric 256  mtu 1500 advmss 1440 
hoplimit 4294967295

Most likely, "hoplimit -1" would be the right number, though I am not 
sure if simply changing %u by %d is a correct thing to do, since it 
would affect all fields.

---
 ip/iproute.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ip/iproute.c b/ip/iproute.c
index 6a2ea05..91a8cc0 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -507,7 +507,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
 
 			if (i != RTAX_RTT && i != RTAX_RTTVAR &&
 			    i != RTAX_RTO_MIN)
-				fprintf(fp, " %u", *(unsigned*)RTA_DATA(mxrta[i]));
+				fprintf(fp, " %d", *(unsigned*)RTA_DATA(mxrta[i]));
 			else {
 				unsigned long long val = *(unsigned*)RTA_DATA(mxrta[i]);
 
-- 

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-03-19  1:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-24 10:27 iproute2: prints bogus hoplimit Jan Engelhardt
2009-03-18 22:12 ` Stephen Hemminger
2009-03-18 22:35   ` Jan Engelhardt
2009-03-18 23:29     ` Stephen Hemminger
2009-03-19  0:54       ` David Miller
2009-03-19  0:51   ` David Miller
2009-03-19  1:01     ` Stephen Hemminger
2009-03-19  1:06       ` David Miller

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).