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

Received: (at submit) by bugs.debian.org; 3 May 2009 13:50:29 +0000
From [email protected] Sun May 03 13:50:29 2009
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rietz.debian.org
X-Spam-Level: 
X-Spam-Bayes: score:0.0000 Tokens: new, 48; hammy, 105; neutral, 46; spammy,
	1. spammytokens:0.987-1--1919 hammytokens:0.000-+--Severity, 0.000-+--struct,
	0.000-+--manpages, 0.000-+--UD:orig, 0.000-+--HX-Operating-System:i686
X-Spam-Status: No, score=-12.2 required=4.0 tests=AWL,BAYES_00,FROMDEVELOPER,
	HAS_PACKAGE,MURPHY_DRUGS_REL8,X_DEBBUGS_CC autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Return-path: <[email protected]>
Received: from coloquinte.cristau.org ([91.121.16.100])
	by rietz.debian.org with esmtp (Exim 4.63)
	(envelope-from <[email protected]>)
	id 1M0c5N-0003VW-6d
	for [email protected]; Sun, 03 May 2009 13:50:29 +0000
Received: from patate.is-a-geek.org (unknown [132.227.81.25])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by coloquinte.cristau.org (Postfix) with ESMTPSA id DD7DBB973
	for <[email protected]>; Sun,  3 May 2009 15:50:27 +0200 (CEST)
Received: by patate.is-a-geek.org (Postfix, from userid 1000)
	id 879D18134; Sun,  3 May 2009 15:50:26 +0200 (CEST)
Date: Sun, 3 May 2009 15:50:26 +0200
From: Julien Cristau <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: manpages: getifaddrs(3) and rtnetlink(7) give wrong type for
	interface stats
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Reportbug-Version: 4.1
X-Debbugs-Cc: [email protected]
X-Operating-System: Linux 2.6.26-2-686 i686
User-Agent: Mutt/1.5.18 (2008-05-17)
Delivered-To: [email protected]
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




Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Wed Nov 13 13:17:35 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.