improper value display in net-tools statistics.c

Bug #1074957 reported by Brett Hawn
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
net-tools (Ubuntu)
New
Undecided
Unassigned

Bug Description

when displaying the IpExt values (eg. netstat -s -e --raw), some values are incorrectly displayed:

netstat -s -e --raw | grep -A 5 IpExt
IpExt:
    InBcastPkts: 2422210
    InOctets: -111824737
    OutOctets: -1002951663
    InBcastOctets: 1366977025

This is due to the printval function taking an 'int' and thus truncating larger values

Tags: patch
Revision history for this message
Brett Hawn (bpiraeus) wrote :
Jason Conti (jconti)
affects: ubuntu → net-tools (Ubuntu)
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "patch to fix display error" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Sander Jonkers (jonkers) wrote :

It is also solved in more recent version of netstat / net-tools, for example the git version. See below.

So why not upgrade to a more recent net-tools in Ubuntu? Can the maintainers take care of that?

Git-version:

sander@HPtje:~/git/net-tools$ ./netstat -s | grep -i octet
    InOctets: 8916276097
    OutOctets: 1457306418
    InMcastOctets: 34823
    OutMcastOctets: 33223
    InBcastOctets: 656
sander@HPtje:~/git/net-tools$
sander@HPtje:~/git/net-tools$ ./netstat --version
net-tools 2.10-alpha
Fred Baumgarten, Alan Cox, Bernd Eckenfels, Phil Blundell, Tuan Hoang, Brian Micek and others
+NEW_ADDRT +RTF_IRTT +RTF_REJECT +FW_MASQUERADE +I18N
AF: (inet) +UNIX +INET +INET6 +IPX +AX25 +NETROM +X25 +ATALK +ECONET +ROSE -BLUETOOTH
HW: +ETHER +ARC +SLIP +PPP +TUNNEL -TR +AX25 +NETROM +X25 +FR +ROSE +ASH +SIT +FDDI +HIPPI +HDLC/LAPB +EUI64
sander@HPtje:~/git/net-tools$

In Ubuntu's version of netstat, there is the 31-bit overflow error:

sander@HPtje:~$ netstat -s | grep -i octet
    InOctets: -1
    OutOctets: 1456778102
    InMcastOctets: 34396
    OutMcastOctets: 32852
    InBcastOctets: 656
sander@HPtje:~$

sander@HPtje:~$ netstat --version
net-tools 1.60
netstat 1.42 (2001-04-15)
Fred Baumgarten, Alan Cox, Bernd Eckenfels, Phil Blundell, Tuan Hoang and others
+NEW_ADDRT +RTF_IRTT +RTF_REJECT +FW_MASQUERADE +I18N
AF: (inet) +UNIX +INET +INET6 +IPX +AX25 +NETROM +X25 +ATALK +ECONET +ROSE
HW: +ETHER +ARC +SLIP +PPP +TUNNEL -TR +AX25 +NETROM +X25 +FR +ROSE +ASH +SIT +FDDI +HIPPI +HDLC/LAPB +EUI64
sander@HPtje:~$

sander@HPtje:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Saucy Salamander (development branch)
Release: 13.10
Codename: saucy
sander@HPtje:~$

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.