diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 39dd83b..452c88d 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -827,7 +827,7 @@ static inline int dev_parse_header(const struct sk_buff *skb, { const struct net_device *dev = skb->dev; - if (!dev->header_ops->parse) + if (!dev->header_ops || !dev->header_ops->parse) return 0; return dev->header_ops->parse(skb, haddr); }