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]

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], [email protected], Martin Schulze <[email protected]>:
Bug#526778; Package manpages. (Sun, 03 May 2009 13:57:07 GMT) (full text, mbox, link).


Acknowledgement sent to Julien Cristau <[email protected]>:
New Bug report received and forwarded. Copy sent to [email protected], Martin Schulze <[email protected]>. (Sun, 03 May 2009 13:57:07 GMT) (full text, mbox, link).


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

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
Date: Sun, 3 May 2009 15:50:26 +0200
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




Information forwarded to [email protected], Martin Schulze <[email protected]>:
Bug#526778; Package manpages. (Sat, 29 May 2010 09:33:03 GMT) (full text, mbox, link).


Acknowledgement sent to Julien Cristau <[email protected]>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <[email protected]>. (Sat, 29 May 2010 09:33:03 GMT) (full text, mbox, link).


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

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
Date: Sat, 29 May 2010 11:29:32 +0200
[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)]

Information forwarded to [email protected], Martin Schulze <[email protected]>:
Bug#526778; Package manpages. (Sun, 12 Sep 2010 13:27:02 GMT) (full text, mbox, link).


Acknowledgement sent to [email protected]:
Extra info received and forwarded to list. Copy sent to Martin Schulze <[email protected]>. (Sun, 12 Sep 2010 13:27:02 GMT) (full text, mbox, link).


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

From: Michael Kerrisk <[email protected]>
To: Julien Cristau <[email protected]>, [email protected]
Cc: Debian Bug Tracking System <[email protected]>
Subject: Re: Bug#526778: manpages: getifaddrs(3) and rtnetlink(7) give wrong type for interface stats
Date: Sun, 12 Sep 2010 15:23:41 +0200
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?

Cheers,

Michael


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



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/




Information forwarded to [email protected], Martin Schulze <[email protected]>:
Bug#526778; Package manpages. (Sun, 12 Sep 2010 13:27:04 GMT) (full text, mbox, link).


Acknowledgement sent to [email protected]:
Extra info received and forwarded to list. Copy sent to Martin Schulze <[email protected]>. (Sun, 12 Sep 2010 13:27:04 GMT) (full text, mbox, link).


Information forwarded to [email protected], Martin Schulze <[email protected]>:
Bug#526778; Package manpages. (Sun, 12 Sep 2010 13:45:06 GMT) (full text, mbox, link).


Acknowledgement sent to Julien Cristau <[email protected]>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <[email protected]>. (Sun, 12 Sep 2010 13:45:06 GMT) (full text, mbox, link).


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

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
Date: Sun, 12 Sep 2010 15:42:29 +0200
[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)]

Added tag(s) upstream. Request was from Simon Paillard <[email protected]> to [email protected]. (Sat, 28 Apr 2012 23:09:06 GMT) (full text, mbox, link).


Added tag(s) confirmed. Request was from Simon Paillard <[email protected]> to [email protected]. (Sat, 28 Apr 2012 23:15:03 GMT) (full text, mbox, link).


Added tag(s) pending. Request was from Simon Paillard <[email protected]> to [email protected]. (Tue, 17 Jul 2012 19:42:05 GMT) (full text, mbox, link).


Set Bug forwarded-to-address to '[email protected]'. Request was from Simon Paillard <[email protected]> to [email protected]. (Mon, 23 Jul 2012 20:15:10 GMT) (full text, mbox, link).


Reply sent to Simon Paillard <[email protected]>:
You have taken responsibility. (Sat, 25 Aug 2012 16:21:08 GMT) (full text, mbox, link).


Notification sent to Julien Cristau <[email protected]>:
Bug acknowledged by developer. (Sat, 25 Aug 2012 16:21:08 GMT) (full text, mbox, link).


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

From: Simon Paillard <[email protected]>
To: [email protected]
Subject: Bug#526778: fixed in manpages 3.42-1
Date: Sat, 25 Aug 2012 16:17:41 +0000
Source: manpages
Source-Version: 3.42-1

We believe that the bug you reported is fixed in the latest version of
manpages, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Simon Paillard <[email protected]> (supplier of updated manpages package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 23 Aug 2012 21:50:38 +0200
Source: manpages
Binary: manpages manpages-dev
Architecture: source all
Version: 3.42-1
Distribution: unstable
Urgency: low
Maintainer: Martin Schulze <[email protected]>
Changed-By: Simon Paillard <[email protected]>
Description: 
 manpages   - Manual pages about using a GNU/Linux system
 manpages-dev - Manual pages about using GNU/Linux for development
Closes: 383296 526778 538641 609033 660479 671514 671515 673436 673873 673875 674051 679498
Changes: 
 manpages (3.42-1) unstable; urgency=low
 .
   [ Simon Paillard ]
   * Add myself to Uploaders
   * Imported Upstream version 3.42:
     . new manpages: get_robust_list.2 mallinfo.3 malloc_info.3 malloc_stats.3
     . remove outdated links: path_resolution.2 epoll.4 fifo.4 futex.4
       complex.5 environ.5
     . Fix repeated word in memchr.3 (Closes: #679498)
     . isgreater.3: arguments must be real-floating (Closes: #609033)
     . utf-8.7: clarifications (Closes: #538641)
     . getaddrinfo.3: note that AI_ADDRCONFIG is not affected by loopback
       addresses (Closes: #660479)
     . Fix "rtnetlink(7): Line in table too long" (Closes: #674051)
     . Fix "netlink(7): Line in table is too long" (Closes: #673875)
     . Fix "netdevice(7): Line in table too long" (Closes: #673873)
     . Fix "suffixes(7): Warnings from "grotty"" (Closes: #673436)
     . Fix "ioctl_list(2): table wider than line width" (Closes: #671515)
     . Fix groff warnings console_codes(4) (Closes: #671514)
     . netlink.7: *_pid fields are not process but port id (Closes: #383296)
   * Drop obsolete formatting patch: gettimeofday.2 wprintf.3 setnetgrent.3
   * Drop patch getgid.2, getuid.2: now documented by upstream credentials(7)
   * Drop inconsistent coding style patch: bsearch.3 qsort.3
   * iconv.3: remove Debian patch, accepted upstream and moved to NOTES
   * Remove old links added 10y ago due to debian specific man-db
   * fclose.3: drop debian patches, mark the remaining as rejected upstream
   * Remove mallinfo.3 from missing.7, added in upstream 3.41
   * Drop outdated debian/readme
   * getifaddrs.3, rtnetlink.7: stats interface is struct rtnl_link_stats, not
     net_device_stats (Closes: #526778) - thanks to Julien Cristau
Checksums-Sha1: 
 adc626704fe11d2d1ee87264e6ffd82b01424448 1904 manpages_3.42-1.dsc
 ca33acaa9708ea04d659ada3e49a2b808ade03dc 1748638 manpages_3.42.orig.tar.gz
 78f668751bc17c5ec2d6eb9f9f4e0c45581bcc1c 46466 manpages_3.42-1.diff.gz
 35199833a71faeb1d1d02210309ac61c8ec52adc 784438 manpages_3.42-1_all.deb
 29def2ec668e3b6d4f746e56793501e3171c3c99 1728792 manpages-dev_3.42-1_all.deb
Checksums-Sha256: 
 ba83353d9cabacd1978261d4763b7665f428b4f02f1bb16e27e6994126831b5f 1904 manpages_3.42-1.dsc
 e366548e907776780d8558d9ab2918d49c28b7f9f926a4bdbe8559cc27165a1d 1748638 manpages_3.42.orig.tar.gz
 d5d96fc20ef2192af599b57a174e510b9868a0ff718662034dfceb4907835e68 46466 manpages_3.42-1.diff.gz
 dbd074db50d0086168e0c1df6a0d2bbf0ff396bdf6ebc20d41ee814f4ab1c3e3 784438 manpages_3.42-1_all.deb
 b0b0bef7ac02ef1bb314856db094c85a33a53f40e3601c1080ec21738d865443 1728792 manpages-dev_3.42-1_all.deb
Files: 
 87240352356f2dc73d8834a9c16365e6 1904 doc important manpages_3.42-1.dsc
 cc8f73ecd8a123ceb7a8670daa91ee6c 1748638 doc important manpages_3.42.orig.tar.gz
 94b82badf5d39c826aa728c7e57f3d9f 46466 doc important manpages_3.42-1.diff.gz
 c96c0a4dfcfef21a1dbae4f982fe0816 784438 doc important manpages_3.42-1_all.deb
 b1ff58b81d31410b5593ee97d4617f67 1728792 doc optional manpages-dev_3.42-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJQOPbyAAoJEN/3OMLRbPuie3gP/RGCk7GsGOIW2jQagjv48WfY
nCb5winm4kaYS4SLf501J9BiIpghDMOntXwL4X7Er8NtV7adbcwr4VawW+BSTDnh
aEiQM9AFkpK2FIKBP2YWwVhqsl4VIEg/fezziRt4dK5b8MPNJLPk74mQ+1MJUG0L
Zb+oMtnwqBFKjb2xU1glNaQ01YUYsLnhZY8n1D+rDVfRRqfFzIiDvVJYdSKU1iwT
T61AYkNfjjIYG91jxjUi7Xi2cQudKqvOMUL0Cz/349A+9b8tMmLPvhjf8coRBOVS
3x7J3skD+npiT5DT9MUswKhwmy8Ml5JSr8JgdJu/zQRcnvWGP3FS6dDHkMRXGgtK
+kHp7yMfiMsmMqQqIjjYzhPRW/xQZslBjNlsCMSbI4VuMArn+hezqb4rfzfHe8yv
kOmeaH8svVEJ2eRbV+YbBglXXsQOeBKLAFWqrdLvVXXmCTuPFprPxsP/OGvQ+i2m
KWRsKzReMQ7nV31xCga9NxENou6v1EnF+sEVi1eBWYWH7lJWwcoYnAnHYHc6UsyA
2hcTw4nwxZCkMTXG/PewYd4OISJ3ChlkCC3yZ7U1dpFQisvgnhjNiROxBfKf2T4x
f1dfpNIfWf0i/ynn9I5QRSbN+ZNhyx0Txc4jiftJt/Dv7kqtU7hYuRje56pdoiC9
EV+YSyJky+x4+NLXJfhB
=ljey
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <[email protected]> to [email protected]. (Sun, 14 Oct 2012 07:27:48 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Mon Nov 11 09:31:03 2024; Machine Name: bembo

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.