Skip to content

Commit

Permalink
[IPv6] SNMP: Increment OutNoRoutes when connecting to unreachable net…
Browse files Browse the repository at this point in the history
…work

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Mitsuru Chinen authored and David S. Miller committed Dec 7, 2007
1 parent 73afc90 commit ca46f9c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/ipv6/ip6_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,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;
Expand Down

0 comments on commit ca46f9c

Please sign in to comment.