From: weidong <weid@nanjing-fnst.com>
To: netdev@vger.kernel.org, davem@davemloft.net
Subject: [patch 0/1]SNMPv2 "ipv6IfStatsInHdrErrors" counter error
Date: Mon, 31 Jul 2006 09:24:09 +0000 (UTC)
Date: Tue, 01 Aug 2006 05:45:33 -0400 [thread overview]
Message-ID: <1154425534.3329.2.camel@LINE> (raw)
Hi, All
When I tested Linux kernel 2.6.17.7 about statistics
"ipv6IfStatsInHdrErrors", found that this counter couldn't increase
correctly. The criteria is RFC2465:
ipv6IfStatsInHdrErrors OBJECT-TYPE
SYNTAX Counter3
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of input datagrams discarded due to
errors in their IPv6 headers, including version
number mismatch, other format errors, hop count
exceeded, errors discovered in processing their
IPv6 options, etc."
::= { ipv6IfStatsEntry 2 }
When I send TTL=0 and TTL=1 a packet to a router which need to be
forwarded, router just sends an ICMPv6 message to tell the sender that
TIME_EXCEED and HOPLIMITS, but no increments for this counter(in the
function ip6_forward).
The following is the patch for this issue.
diff -ruN old/net/ipv6/ip6_output.c new/net/ipv6/ip6_output.c
--- old/net/ipv6/ip6_output.c 2006-07-25 11:36:01.000000000 +0800
+++ new/net/ipv6/ip6_output.c 2006-07-31 16:16:13.000000000 +0800
@@ -356,6 +356,7 @@
skb->dev = dst->dev;
icmpv6_send(skb, ICMPV6_TIME_EXCEED, ICMPV6_EXC_HOPLIMIT,
0, skb->dev);
+ IP6_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS);
kfree_skb(skb);
return -ETIMEDOUT;
signed-off-by:Wei Dong <weid@nanjing-fnst.com>
Regards
Wei Dong
next reply other threads:[~2006-07-31 9:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-31 9:24 weidong [this message]
2006-07-31 9:36 ` [patch 0/1]SNMPv2 "ipv6IfStatsInHdrErrors" counter error YOSHIFUJI Hideaki / 吉藤英明
2006-08-02 20:42 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1154425534.3329.2.camel@LINE \
--to=weid@nanjing-fnst.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).