From: Mitsuru Chinen Date: Mon, 30 Apr 2007 07:45:49 +0000 (-0700) Subject: [IPV4] SNMP: Support InNoRoutes X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e91a47ebb130b90790c7a8c625ade4dcea246842;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [IPV4] SNMP: Support InNoRoutes An IP datagram which is being discarded because of no routes in the forwarding path should be counted as InNoRoutes. Signed-off-by: Mitsuru Chinen Signed-off-by: David S. Miller --- diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index 324e7e0fdb2a..63ab5230c611 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c @@ -340,6 +340,8 @@ static inline int ip_rcv_finish(struct sk_buff *skb) if (unlikely(err)) { if (err == -EHOSTUNREACH) IP_INC_STATS_BH(IPSTATS_MIB_INADDRERRORS); + else if (err == -ENETUNREACH) + IP_INC_STATS_BH(IPSTATS_MIB_INNOROUTES); goto drop; } }