summaryrefslogtreecommitdiff
path: root/net/ipv4/gre_demux.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/gre_demux.c')
-rw-r--r--net/ipv4/gre_demux.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv4/gre_demux.c b/net/ipv4/gre_demux.c
index dafd68f3436a..96fd7dc6d82d 100644
--- a/net/ipv4/gre_demux.c
+++ b/net/ipv4/gre_demux.c
@@ -159,14 +159,18 @@ static int gre_rcv(struct sk_buff *skb)
rcu_read_lock();
proto = rcu_dereference(gre_proto[ver]);
if (!proto || !proto->handler)
- goto drop_unlock;
+ goto drop_nohandler;
ret = proto->handler(skb);
rcu_read_unlock();
return ret;
-drop_unlock:
+drop_nohandler:
rcu_read_unlock();
+ dev_core_stats_rx_nohandler_inc(skb->dev);
+ kfree_skb(skb);
+ return NET_RX_DROP;
drop:
+ dev_core_stats_rx_dropped_inc(skb->dev);
kfree_skb(skb);
return NET_RX_DROP;
}