From 7f48289fcd7c74acc48b41bc4f44061b0b164e9f Mon Sep 17 00:00:00 2001 From: Joel Cunningham Date: Tue, 29 Nov 2016 15:22:55 -0600 Subject: [PATCH] Increment ip.drop when dropping due to NULL netif This commit increments the ip.drop statistic when an IP packet is dropped due to no matching netif found and forwarding is disabled This adds parity to the other places where mib2.ipinaddrerrors and mib2.ipindiscards are incremented which also increment ip.drop --- src/core/ipv4/ip4.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/ipv4/ip4.c b/src/core/ipv4/ip4.c index 7dfca76a..b72afab1 100644 --- a/src/core/ipv4/ip4.c +++ b/src/core/ipv4/ip4.c @@ -598,6 +598,7 @@ ip4_input(struct pbuf *p, struct netif *inp) } else #endif /* IP_FORWARD */ { + IP_STATS_INC(ip.drop); MIB2_STATS_INC(mib2.ipinaddrerrors); MIB2_STATS_INC(mib2.ipindiscards); }