Skip to contentSkip to conversation

SNMP: Increment OutNoRoutes when connecting to unreachable network

PATCH In review Mitsuru Chinen 2 participants 2 messages Dec 6, 2007

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SNMP: Increment OutNoRoutes when connecting to unreachable network

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.

---
 net/ipv6/ip6_output.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
net/ipv6/ip6_output.c +2 -0
index 89cca7c..388a098 100644
@@ -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;
Signature · 1 line
1.5.3.4
maintainer
#1 lore raw

From: Mitsuru Chinen <[email protected]>
Date: Thu, 6 Dec 2007 15:29:48 +0900

Quoted 6 lines

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.

Patch applied, thanks!