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 #25 received at [email protected] (full text, mbox, reply):

Received: (at 526778) by bugs.debian.org; 12 Sep 2010 13:42:34 +0000
From [email protected] Sun Sep 12 13:42:34 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, 21; hammy, 151; neutral, 80; spammy,
	0. spammytokens: hammytokens:0.000-+--H*c:pgp-sha256, 0.000-+--H*rp:U*julien,
	0.000-+--H*RU:sk:julien@, 0.000-+--HX-Spam-Relays-External:sk:julien@,
	0.000-+--H*F:U*jcristau
X-Spam-Status: No, score=-12.9 required=4.0 tests=BAYES_00,FOURLA,
	FROMDEVELOPER,HAS_BUG_NUMBER,IMPRONONCABLE_2,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 1OumpG-0006J4-6n
	for [email protected]; Sun, 12 Sep 2010 13:42:34 +0000
Received: from radis.liafa.jussieu.fr (unknown [78.251.104.40])
	(using TLSv1 with cipher AES256-SHA (256/256 bits))
	(No client certificate requested)
	by coloquinte.cristau.org (Postfix) with ESMTPSA id D335BBB71;
	Sun, 12 Sep 2010 15:42:30 +0200 (CEST)
Received: from julien by radis.liafa.jussieu.fr with local (Exim 4.72)
	(envelope-from <[email protected]>)
	id 1OumpC-00025g-1T; Sun, 12 Sep 2010 15:42:30 +0200
Date: Sun, 12 Sep 2010 15:42:29 +0200
From: Julien Cristau <[email protected]>
To: Michael Kerrisk <[email protected]>
Cc: [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]>
 <[email protected]>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature"; boundary="4vu0d+lqoSa2/ZEk"
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)]
On Sun, Sep 12, 2010 at 15:23:41 +0200, Michael Kerrisk wrote:

> On Sun, May 3, 2009 at 3:50 PM, Julien Cristau <[email protected]> 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.
> 
> Just looking in from upstream here... I guess this piece must refer to
> some Debian specific text, since I don't find the referred to text in
> the upstream page?
> 
Hi Michael,

the bug is still in getifaddrs(3) and rtnetlink(7) in
git://git.kernel.org/pub/scm/docs/man-pages/man-pages as far as I can
tell.

The NOTES section of getifaddrs(3) says [1]
       In this case, the ifa_data field may contain a pointer
       to  a  struct  net_device_stats,  defined in <linux/netdevice.h>, which
       contains various interface attributes and statistics.
and the section about RTM_NEWLINK, RTM_DELLINK, RTM_GETLINK in
rtnetlink(7) says [2]
              The value type for IFLA_STATS is struct net_device_stats.

[1] http://git.kernel.org/?p=docs/man-pages/man-pages.git;a=blob;f=man3/getifaddrs.3;h=7e8aa259a263ff0c5245c2c0983c05956a2b1473;hb=HEAD#l185
[2] http://git.kernel.org/?p=docs/man-pages/man-pages.git;a=blob;f=man7/rtnetlink.7;h=d93d39531652e79a66be0badcd6715dbacd78588;hb=HEAD#l103

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 13:01:11 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.