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

Attachment: signature.asc
Description: Digital signature

Reply via email to