summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/core/drop_monitor.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c
index cc60cc22e2db..536e032d95c8 100644
--- a/net/core/drop_monitor.c
+++ b/net/core/drop_monitor.c
@@ -487,6 +487,9 @@ static void net_dm_packet_trace_kfree_skb_hit(void *ignore,
struct sk_buff *nskb;
unsigned long flags;
+ if (!skb_mac_header_was_set(skb))
+ return;
+
nskb = skb_clone(skb, GFP_ATOMIC);
if (!nskb)
return;
@@ -900,6 +903,9 @@ net_dm_hw_packet_probe(struct sk_buff *skb,
struct sk_buff *nskb;
unsigned long flags;
+ if (!skb_mac_header_was_set(skb))
+ return;
+
nskb = skb_clone(skb, GFP_ATOMIC);
if (!nskb)
return;