projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7613c87
)
qlcnic: fix panic while using eth_hdr
author
Rajesh Borundia
<
[email protected]
>
Tue, 31 Aug 2010 17:17:49 +0000
(17:17 +0000)
committer
David S. Miller
<
[email protected]
>
Wed, 1 Sep 2010 17:41:56 +0000
(10:41 -0700)
o skb->mac_header is not set, so machine panics while using function eth_hdr.
Signed-off-by: Rajesh Borundia <
[email protected]
>
Signed-off-by: Amit Kumar Salecha <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/qlcnic/qlcnic_main.c
patch
|
blob
|
history
diff --git
a/drivers/net/qlcnic/qlcnic_main.c
b/drivers/net/qlcnic/qlcnic_main.c
index 9a3ebb8a820363150547d410a80a2bafcdfa0882..789fe817cfca1c55582e3236b042120d1531f1f8 100644
(file)
--- a/
drivers/net/qlcnic/qlcnic_main.c
+++ b/
drivers/net/qlcnic/qlcnic_main.c
@@
-1991,6
+1991,7
@@
qlcnic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
struct qlcnic_skb_frag *buffrag;
struct cmd_desc_type0 *hwdesc, *first_desc;
struct pci_dev *pdev;
+ struct ethhdr *phdr;
int i, k;
u32 producer;
@@
-2003,7
+2004,8
@@
qlcnic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
}
if (adapter->flags & QLCNIC_MACSPOOF) {
- if (compare_ether_addr(eth_hdr(skb)->h_source,
+ phdr = (struct ethhdr *)skb->data;
+ if (compare_ether_addr(phdr->h_source,
adapter->mac_addr))
goto drop_packet;
}