From patchwork Tue Feb 24 10:27:52 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Engelhardt X-Patchwork-Id: 23612 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 3FFB4DDE00 for ; Tue, 24 Feb 2009 21:28:10 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753087AbZBXK15 (ORCPT ); Tue, 24 Feb 2009 05:27:57 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752241AbZBXK14 (ORCPT ); Tue, 24 Feb 2009 05:27:56 -0500 Received: from sovereign.computergmbh.de ([85.214.69.204]:60770 "EHLO sovereign.computergmbh.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751852AbZBXK14 (ORCPT ); Tue, 24 Feb 2009 05:27:56 -0500 Received: by sovereign.computergmbh.de (Postfix, from userid 25121) id DE1372AF1A5; Tue, 24 Feb 2009 11:27:52 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by sovereign.computergmbh.de (Postfix) with ESMTP id DCBD9441DBA4; Tue, 24 Feb 2009 11:27:52 +0100 (CET) Date: Tue, 24 Feb 2009 11:27:52 +0100 (CET) From: Jan Engelhardt To: Stephen Hemminger cc: netdev@vger.kernel.org Subject: iproute2: prints bogus hoplimit Message-ID: User-Agent: Alpine 2.00 (LSU 1167 2008-08-23) MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org $ 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]);