netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 0/1]SNMPv2 "ipv6IfStatsInHdrErrors" counter error
@ 2006-07-31  9:24 weidong
  2006-07-31  9:36 ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 1 reply; 3+ messages in thread
From: weidong @ 2006-07-31  9:24 UTC (permalink / raw)
  To: netdev, davem

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch 0/1]SNMPv2 "ipv6IfStatsInHdrErrors" counter error
  2006-07-31  9:24 [patch 0/1]SNMPv2 "ipv6IfStatsInHdrErrors" counter error weidong
@ 2006-07-31  9:36 ` YOSHIFUJI Hideaki / 吉藤英明
  2006-08-02 20:42   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2006-07-31  9:36 UTC (permalink / raw)
  To: weid; +Cc: netdev, davem, yoshfuji

Hello.

Next time, please put your "Signed-off-by" line before the patch.
Thank you.

In article <1154425534.3329.2.camel@LINE> (at Tue, 01 Aug 2006 05:45:33 -0400), weidong <weid@nanjing-fnst.com> says:

> signed-off-by:Wei Dong <weid@nanjing-fnst.com>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

--yoshfuji

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch 0/1]SNMPv2 "ipv6IfStatsInHdrErrors" counter error
  2006-07-31  9:36 ` YOSHIFUJI Hideaki / 吉藤英明
@ 2006-08-02 20:42   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2006-08-02 20:42 UTC (permalink / raw)
  To: yoshfuji; +Cc: weid, netdev

From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Date: Mon, 31 Jul 2006 18:36:25 +0900 (JST)

> Hello.
> 
> Next time, please put your "Signed-off-by" line before the patch.
> Thank you.
> 
> In article <1154425534.3329.2.camel@LINE> (at Tue, 01 Aug 2006 05:45:33 -0400), weidong <weid@nanjing-fnst.com> says:
> 
> > signed-off-by:Wei Dong <weid@nanjing-fnst.com>
> Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

Patch applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-08-02 20:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-31  9:24 [patch 0/1]SNMPv2 "ipv6IfStatsInHdrErrors" counter error weidong
2006-07-31  9:36 ` YOSHIFUJI Hideaki / 吉藤英明
2006-08-02 20:42   ` David Miller

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).