diff --git a/net/core/dev.c b/net/core/dev.c index f500a6947210..480be7258f29 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1633,7 +1633,7 @@ static inline int deliver_skb(struct sk_buff *skb, static inline bool skb_loop_sk(struct packet_type *ptype, struct sk_buff *skb) { - if (ptype->af_packet_priv == NULL) + if (!ptype->af_packet_priv || !skb->sk) return false; if (ptype->id_match)