lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGK4HS_ty2=f0PNU-w8QPP9BoP67E+4MaDxLTLV4G22dx_7A-Q@mail.gmail.com>
Date:	Fri, 5 Dec 2014 15:35:10 -0800
From:	Vijay Subramanian <subramanian.vijay@...il.com>
To:	netdev <netdev@...r.kernel.org>
Subject: iproute2/nstat: Bug in displaying icmp stats

Hi,

I noticed nstat is displaying icmp stats incorrectly.

$ cat /proc/net/snmp | grep Icmp | head -2 | awk '{print $1 " " $2 " "
$3 " " $4}'
Icmp: InMsgs InErrors InCsumErrors
Icmp: 215 0 0

$ nstat  -az | grep IcmpIn  | head -3
IcmpInMsgs                      0                  0.0
IcmpInErrors                    215                0.0
IcmpInCsumErrors                0                  0.0

For example, as seen in /proc/net/snmp, IcmpInMsgs should be 215 but
that value is assigned to IcmpInErrors.

The issue seems to be the way the values are populated.

$vim +209 misc/nstat.c
-----x----

                       /* Trick to skip "dummy" trailing ICMP MIB in 2.4 */

                        if (strcmp(idbuf, "IcmpOutAddrMaskReps") == 0)

                                idbuf[5] = 0;

                        else

                                n = n->next;

-----x------

It seems "IcmpOutAddrMaskReps" is processed twice and values assigned
are off by one.

Any idea what the code is doing for 2.4 kernel and how to fix this?

vijay
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ