diff options
author | Patrick McHardy <kaber@trash.net> | 2007-10-18 08:09:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-10-18 08:09:28 -0400 |
commit | 1b83336bb9fa4f110b5b0a4378a82cd5f0fd0ac8 (patch) | |
tree | 0eb85178fe55ac084d2e62037432a1f8ae48b74d /include/linux | |
parent | df2e014bfbbf26d160e1bf47b05fc05c96205e2b (diff) |
[NET]: Fix OOPS due to missing check in dev_parse_header().
[ This is kernel bugzilla 9174 "linux-2.6.23-git11 kernel panic" ]
The device in question is an IPv6-over-IPv4 tunnel, which doesn't have
any header_ops, so the crash happens in dev_parse_header when
dereferencing them.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/netdevice.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 39dd83b183a9..452c88d971ad 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, | |||
827 | { | 827 | { |
828 | const struct net_device *dev = skb->dev; | 828 | const struct net_device *dev = skb->dev; |
829 | 829 | ||
830 | if (!dev->header_ops->parse) | 830 | if (!dev->header_ops || !dev->header_ops->parse) |
831 | return 0; | 831 | return 0; |
832 | return dev->header_ops->parse(skb, haddr); | 832 | return dev->header_ops->parse(skb, haddr); |
833 | } | 833 | } |