Parcourir la source

[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 <mitch@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mitsuru Chinen il y a 18 ans
Parent
commit
e91a47ebb1
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      net/ipv4/ip_input.c

+ 2 - 0
net/ipv4/ip_input.c

@@ -340,6 +340,8 @@ static inline int ip_rcv_finish(struct sk_buff *skb)
 		if (unlikely(err)) {
 		if (unlikely(err)) {
 			if (err == -EHOSTUNREACH)
 			if (err == -EHOSTUNREACH)
 				IP_INC_STATS_BH(IPSTATS_MIB_INADDRERRORS);
 				IP_INC_STATS_BH(IPSTATS_MIB_INADDRERRORS);
+			else if (err == -ENETUNREACH)
+				IP_INC_STATS_BH(IPSTATS_MIB_INNOROUTES);
 			goto drop;
 			goto drop;
 		}
 		}
 	}
 	}