Debian Bug report logs - #526778
manpages: getifaddrs(3) and rtnetlink(7) give wrong type for interface stats

version graph

Package: manpages; Maintainer for manpages is Dr. Tobias Quathamer <[email protected]>; Source for manpages is src:manpages (PTS, buildd, popcon).

Reported by: Julien Cristau <[email protected]>

Date: Sun, 3 May 2009 13:57:04 UTC

Severity: normal

Tags: confirmed, patch, upstream

Found in version manpages/3.21-1

Fixed in version manpages/3.42-1

Done: Simon Paillard <[email protected]>

Bug is archived. No further changes may be made.

Forwarded to [email protected]

Full log


Message #10 received at [email protected] (full text, mbox, reply):

Received: (at 526778) by bugs.debian.org; 29 May 2010 09:29:39 +0000
From [email protected] Sat May 29 09:29:39 2010
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on busoni.debian.org
X-Spam-Level: 
X-Spam-Bayes: score:0.0000 Tokens: new, 33; hammy, 147; neutral, 47; spammy,
	2. spammytokens:1.000-1--H*r:456, 0.915-+--receive
	hammytokens:0.000-+--H*c:pgp-sha256, 0.000-+--H*c:pgp-signature,
	0.000-+--H*c:protocol, 0.000-+--H*c:micalg, 0.000-+--H*c:signed
X-Spam-Status: No, score=-12.1 required=4.0 tests=AWL,BAYES_00,FROMDEVELOPER,
	HAS_BUG_NUMBER,MURPHY_DRUGS_REL8,PGPSIGNATURE autolearn=ham
	version=3.2.5-bugs.debian.org_2005_01_02
Return-path: <[email protected]>
Received: from coloquinte.cristau.org ([91.121.16.100])
	by busoni.debian.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.69)
	(envelope-from <[email protected]>)
	id 1OIIMM-0007dm-Su
	for [email protected]; Sat, 29 May 2010 09:29:39 +0000
Received: from radis.liafa.jussieu.fr (unknown [IPv6:2001:0:53aa:64c:456:6fbf:ac8d:666b])
	(using TLSv1 with cipher AES256-SHA (256/256 bits))
	(No client certificate requested)
	by coloquinte.cristau.org (Postfix) with ESMTPSA id 7298FBBA0;
	Sat, 29 May 2010 11:29:34 +0200 (CEST)
Received: from julien by radis.liafa.jussieu.fr with local (Exim 4.71)
	(envelope-from <[email protected]>)
	id 1OIIMG-0004el-94; Sat, 29 May 2010 11:29:32 +0200
Date: Sat, 29 May 2010 11:29:32 +0200
From: Julien Cristau <[email protected]>
To: [email protected], [email protected]
Subject: Re: Bug#526778: manpages: getifaddrs(3) and rtnetlink(7) give
 wrong type for interface stats
Message-ID: <[email protected]>
References: <[email protected]>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature"; boundary="LQksG6bCIzRHxTLp"
Content-Disposition: inline
In-Reply-To: <[email protected]>
X-Operating-System: Linux 2.6.32-5-amd64 x86_64
User-Agent: Mutt/1.5.20 (2009-06-14)
[Message part 1 (text/plain, inline)]
ping?  I reported this a year ago but this is still present in manpages
3.24.

Cheers,
Julien

On Sun, May  3, 2009 at 15:50:26 +0200, Julien Cristau wrote:

> Package: manpages
> Version: 3.21-1
> Severity: normal
> Tags: patch
> 
> Hi,
> 
> getifaddrs(3) and rtnetlink(7) both refer to struct net_device_stats,
> but the actual struct returned is rtnl_link_stats (I noticed this
> because using net_device_stats leads to completely bogus values on
> 64bit).  As far as I can tell struct net_device_stats is used inside the
> kernel, but net/core/rtnetlink.c:rtnl_fill_ifinfo() exports that
> information as struct rtnl_link_stats in the netlink message.
> 
> --- manpages-3.21.orig/man7/rtnetlink.7
> +++ manpages-3.21/man7/rtnetlink.7
> @@ -100,7 +100,7 @@
>  T}:Interface Statistics.
>  .TE
>  .sp
> -The value type for IFLA_STATS is \fIstruct net_device_stats\fP.
> +The value type for IFLA_STATS is \fIstruct rtnl_link_stats\fP.
>  .TP
>  .BR RTM_NEWADDR ", " RTM_DELADDR ", " RTM_GETADDR
>  Add, remove or receive information about an IP address associated with
> --- manpages-3.21.orig/man3/getifaddrs.3
> +++ manpages-3.21/man3/getifaddrs.3
> @@ -191,9 +191,9 @@
>  In this case, the
>  .I ifa_data
>  field may contain a pointer to a
> -.IR "struct net_device_stats" ,
> +.IR "struct rtnl_link_stats" ,
>  defined in
> -.IR <linux/netdevice.h> ,
> +.IR <linux/if_link.h> ,
>  which contains various interface attributes and statistics.
>  .SH EXAMPLE
>  The program below demonstrates the use of
> 
> Cheers,
> Julien
[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Wed Nov 13 12:51:06 2024; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.