* [PATCH] [IPv6] SNMP: Increment OutNoRoutes when connecting to unreachable network
@ 2007-12-06 6:29 Mitsuru Chinen
2007-12-06 6:32 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Mitsuru Chinen @ 2007-12-06 6:29 UTC (permalink / raw)
To: netdev; +Cc: David Miller
IPv6 stack doesn't increment OutNoRoutes counter when IP datagrams
is being discarded because no route could be found to transmit them
to their destination. IPv6 stack should increment the counter.
Incidentally, IPv4 stack increments that counter in such situation.
Signed-off-by: Mitsuru Chinen <mitch@linux.vnet.ibm.com>
---
net/ipv6/ip6_output.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 89cca7c..388a098 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -960,6 +960,8 @@ static int ip6_dst_lookup_tail(struct sock *sk,
return 0;
out_err_release:
+ if (err == -ENETUNREACH)
+ IP6_INC_STATS_BH(NULL, IPSTATS_MIB_OUTNOROUTES);
dst_release(*dst);
*dst = NULL;
return err;
--
1.5.3.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] [IPv6] SNMP: Increment OutNoRoutes when connecting to unreachable network
2007-12-06 6:29 [PATCH] [IPv6] SNMP: Increment OutNoRoutes when connecting to unreachable network Mitsuru Chinen
@ 2007-12-06 6:32 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-12-06 6:32 UTC (permalink / raw)
To: mitch; +Cc: netdev
From: Mitsuru Chinen <mitch@linux.vnet.ibm.com>
Date: Thu, 6 Dec 2007 15:29:48 +0900
> IPv6 stack doesn't increment OutNoRoutes counter when IP datagrams
> is being discarded because no route could be found to transmit them
> to their destination. IPv6 stack should increment the counter.
> Incidentally, IPv4 stack increments that counter in such situation.
>
> Signed-off-by: Mitsuru Chinen <mitch@linux.vnet.ibm.com>
Patch applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-06 6:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-06 6:29 [PATCH] [IPv6] SNMP: Increment OutNoRoutes when connecting to unreachable network Mitsuru Chinen
2007-12-06 6:32 ` 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).