Bug 287471 - /proc/net/snmp6 and /proc/net/dev_snmp6/* do not contain Icmp6OutEchos
Summary: /proc/net/snmp6 and /proc/net/dev_snmp6/* do not contain Icmp6OutEchos
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
(Show other bugs)
Version: 5.1
Hardware: All Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Neil Horman
QA Contact: Martin Jenner
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 231191
TreeView+ depends on / blocked
 
Reported: 2007-09-12 11:13 UTC by Jan Safranek
Modified: 2007-11-27 16:30 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-27 16:30:03 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
new patch (2.16 KB, patch)
2007-11-15 19:45 UTC, Neil Horman
no flags Details | Diff

Description Jan Safranek 2007-09-12 11:13:11 UTC
Description of problem:
/proc/net/snmp6 and /proc/net/dev_snmp6/* contain various statistics which
net-snmp uses to allow remote management of a network node. These statistics
include counter of incoming IPv6 echo request, incoming echo replies and
outgoing echo replies, but number of outgoing echo requests is missing.

Net-snmp cannot implement part of its functionality because of missing nr. of
sent IPv6 echo requests.

Version-Release number of selected component (if applicable):
kernel-2.6.18-8.el5 (x86_64)

How reproducible:
always

Steps to Reproduce:
1. cat /proc/net/snmp6 | grep Echo
2. cat /proc/net/dev_snmp6/eth0 | grep Echo

Actual results:
Icmp6InEchos           1
Icmp6InEchoReplies     2
Icmp6OutEchoReplies    3

Expected results:
Icmp6InEchos           1
Icmp6InEchoReplies     2
Icmp6OutEchoReplies    3
Icmp6OutEchos          4

Additional info:

Comment 1 Neil Horman 2007-09-17 14:57:51 UTC
It just occured to me why we don't nominally count OutEchos: Its because the
kernel doesn't send them.  User space applications send them using raw or udp
sockets in which the hdrincl bit is set for outgoing messages.  The kernel just
sees these as raw data, and there is no code path through which we can acurately
count on all the outgoing echos to pass.  I'm going to see if I can come up with
something, but this may have to be a CANTFIX issue.

Comment 2 Neil Horman 2007-09-18 20:28:24 UTC
my upstream development on this can be tracked here:
http://git.infradead.org/?p=users/nhorman/linux-2.6.git;a=shortlog;h=snmp

Comment 3 Neil Horman 2007-10-11 18:19:13 UTC
Jan, I've got a patch that could use some testing.  kernels are build in brew under:

brewroot/scratch/nhorman/task_1006335

They should implement ICMPOUTECHOS

If you could test and confrim, I would appreciate it.  Thanks!

Comment 4 Jan Safranek 2007-10-12 08:48:41 UTC
It does not work for me (at least in my KVM virtualized environment) -
Icmp6OutEchos is still zero:

$ uname -a
Linux rhel5-x86_64 2.6.18-53.el5.bz287471 #1 SMP Thu Oct 11 11:16:08 EDT 2007
x86_64 x86_64 x86_64 GNU/Linux

$ ping6 -c 3 2001:0db8:0:f101::1
PING 2001:0db8:0:f101::1(2001:db8:0:f101::1) 56 data bytes
64 bytes from 2001:db8:0:f101::1: icmp_seq=0 ttl=64 time=2.58 ms
64 bytes from 2001:db8:0:f101::1: icmp_seq=1 ttl=64 time=0.348 ms
64 bytes from 2001:db8:0:f101::1: icmp_seq=2 ttl=64 time=0.608 ms
...

$ grep Echo /proc/net/snmp6
Icmp6InEchos                            6
Icmp6InEchoReplies                      16
Icmp6OutEchos                           0
Icmp6OutEchoReplies                     6

Is here any way how I can help you to localize the problem?

Comment 5 Jan Safranek 2007-11-14 15:29:11 UTC
One of the patches in bug #253278 adds the necessary counters.

Comment 6 Neil Horman 2007-11-15 19:45:21 UTC
Created attachment 260331 [details]
new patch

ok, heres a new test patch.  It seems to work reasonably well for me.  Please
confirm and I'll send it upstream and for RHEL5 review.  Thanks!

Comment 7 Jan Safranek 2007-11-20 10:06:41 UTC
By comment #5 I had in my mind that you do not need to care about this bug
anymore and close it when bug #253278 is fixed, but I checked the patch in
comment #6 and it works. Thank you very much.

I noticed slightly strange results - if I ping link-local IPv6 address, I get
outgoing echo requests counted on eth0, but incoming echo requests on loopback:
$ ifconfig
eth0 inet6 addr: fe80::216:3eff:fe74:fd65/64 Scope:Link

$ ping -I eth0 fe80::216:3eff:fe74:fd65/64
64 bytes from fe80::216:3eff:fe74:fd65: icmp_seq=0 ttl=64 time=0.357 ms
64 bytes from fe80::216:3eff:fe74:fd65: icmp_seq=1 ttl=64 time=0.070 ms

$  grep Echo /proc/net/dev_snmp6/*
/proc/net/dev_snmp6/eth0:Icmp6InEchos        0
/proc/net/dev_snmp6/eth0:Icmp6InEchoReplies  0
/proc/net/dev_snmp6/eth0:Icmp6OutEchos       2
/proc/net/dev_snmp6/eth0:Icmp6OutEchoReplies 0
/proc/net/dev_snmp6/lo:Icmp6InEchos          2
/proc/net/dev_snmp6/lo:Icmp6InEchoReplies    2
/proc/net/dev_snmp6/lo:Icmp6OutEchos         0
/proc/net/dev_snmp6/lo:Icmp6OutEchoReplies   2

I would expect that all packets go through the same interface, eth0 in this
case. I do not necessarily mean it is a bug, the results are just a little
surprising.

Comment 8 Neil Horman 2007-11-27 16:30:03 UTC
Looks like upstream already has support for outEchos from this commit:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=14878f75abd5bf1d38becb405801cd491ee215dc

Looks like our work here is done for RHEL6


Note You need to log in before you can comment on or make changes to this bug.