* SNMPv2 "ipv6IfStatsInAddrErrors" counter error
@ 2005-06-19 20:45 Lv Liangying
2006-08-29 7:01 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Lv Liangying @ 2005-06-19 20:45 UTC (permalink / raw)
To: netdev; +Cc: davem
Hi, All
When I tested Linux kernel 2.6.17.7 about statistics
"ipv6IfStatsInAddrErrors", found that this counter couldn't increase
correctly. The criteria is RFC2465:
ipv6IfStatsInAddrErrors OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of input datagrams discarded because
the IPv6 address in their IPv6 header's destination
field was not a valid address to be received at
this entity. This count includes invalid
addresses (e.g., ::0) and unsupported addresses
(e.g., addresses with unallocated prefixes). For
entities which are not IPv6 routers and therefore
do not forward datagrams, this counter includes
datagrams discarded because the destination address
was not a local address."
::= { ipv6IfStatsEntry 5 }
When I send packet to host with destination that is ether invalid
address(::0) or unsupported addresses(1::1), the Linux kernel just
discard the packet, and the counter doesn't increase(in the function
ip6_pkt_discard).
signed-off by Lv Liangying <lvly@nanjing-fnst.com>
--- old/net/ipv6/route.c 2006-07-25 11:36:01.000000000 +0800
+++ new/net/ipv6/route.c 2006-08-08 16:13:04.000000000 +0800
@@ -1526,6 +1526,10 @@
static int ip6_pkt_discard(struct sk_buff *skb)
{
+ int type = ipv6_addr_type(&skb->nh.ipv6h->daddr);
+ if (type == IPV6_ADDR_ANY || type == IPV6_ADDR_RESERVED)
+ IP6_INC_STATS(IPSTATS_MIB_INADDRERRORS);
+
IP6_INC_STATS(IPSTATS_MIB_OUTNOROUTES);
icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_NOROUTE, 0, skb->dev);
kfree_skb(skb);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: SNMPv2 "ipv6IfStatsInAddrErrors" counter error
2005-06-19 20:45 SNMPv2 "ipv6IfStatsInAddrErrors" counter error Lv Liangying
@ 2006-08-29 7:01 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2006-08-29 7:01 UTC (permalink / raw)
To: lvly; +Cc: netdev
From: Lv Liangying <lvly@nanjing-fnst.com>
Date: Sun, 19 Jun 2005 16:45:04 -0400
> Hi, All
>
> When I tested Linux kernel 2.6.17.7 about statistics
> "ipv6IfStatsInAddrErrors", found that this counter couldn't increase
> correctly. The criteria is RFC2465:
> ipv6IfStatsInAddrErrors OBJECT-TYPE
> SYNTAX Counter32
> MAX-ACCESS read-only
> STATUS current
> DESCRIPTION
> "The number of input datagrams discarded because
> the IPv6 address in their IPv6 header's destination
> field was not a valid address to be received at
> this entity. This count includes invalid
> addresses (e.g., ::0) and unsupported addresses
> (e.g., addresses with unallocated prefixes). For
> entities which are not IPv6 routers and therefore
> do not forward datagrams, this counter includes
> datagrams discarded because the destination address
> was not a local address."
> ::= { ipv6IfStatsEntry 5 }
>
> When I send packet to host with destination that is ether invalid
> address(::0) or unsupported addresses(1::1), the Linux kernel just
> discard the packet, and the counter doesn't increase(in the function
> ip6_pkt_discard).
>
> signed-off by Lv Liangying <lvly@nanjing-fnst.com>
Looks good, patch applied. Thanks a lot.
BTW, the correct form of a sign off is:
Signed-off-by: David S. Miller <davem@davemloft.net>
Please keep the capitalization, colon character, etc.
consistent with that. Thanks again.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-08-29 7:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-19 20:45 SNMPv2 "ipv6IfStatsInAddrErrors" counter error Lv Liangying
2006-08-29 7:01 ` 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).