@@ -413,6 +413,11 @@ enum skb_drop_reason {
* failed (maybe an eBPF program
* is tricking?)
*/
+ SKB_DROP_REASON_PTYPE_ABSENT, /* not packet_type found to handle
+ * the skb. For an etner packet,
+ * this means that L3 protocol is
+ * not supported
+ */
SKB_DROP_REASON_MAX,
};
@@ -5330,11 +5330,13 @@ static int __netif_receive_skb_core(struct sk_buff **pskb, bool pfmemalloc,
*ppt_prev = pt_prev;
} else {
drop:
- if (!deliver_exact)
+ if (!deliver_exact) {
atomic_long_inc(&skb->dev->rx_dropped);
- else
+ kfree_skb_reason(skb, SKB_DROP_REASON_PTYPE_ABSENT);
+ } else {
atomic_long_inc(&skb->dev->rx_nohandler);
- kfree_skb(skb);
+ kfree_skb(skb);
+ }
/* Jamal, now you will not able to escape explaining
* me how you were going to use this. :-)
*/