summaryrefslogtreecommitdiffstats
path: root/drivers/net/qlge
diff options
context:
space:
mode:
authorRon Mercer <ron.mercer@qlogic.com>2009-06-09 05:39:28 +0000
committerDavid S. Miller <davem@davemloft.net>2009-06-10 01:04:12 -0700
commitec33a49135d96df56ef106a49c2434ca81f821f9 (patch)
treeaf78eac4273f6e2f830d23c36a38e4e59f3ba62b /drivers/net/qlge
parenta32959cd9df77423c8b375119ee7f135ff302bc1 (diff)
downloadlinux-ec33a49135d96df56ef106a49c2434ca81f821f9.tar.gz
linux-ec33a49135d96df56ef106a49c2434ca81f821f9.tar.bz2
linux-ec33a49135d96df56ef106a49c2434ca81f821f9.zip
qlge: Drop inbound frames > MTU.
The max frame size register is set higher than the MTU to accomodate FCoE frames. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge')
-rw-r--r--drivers/net/qlge/qlge_main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index 0775b4d7d3ff..738691ddcc04 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -1532,6 +1532,15 @@ static void ql_process_mac_rx_intr(struct ql_adapter *qdev,
dev_kfree_skb_any(skb);
return;
}
+
+ /* The max framesize filter on this chip is set higher than
+ * MTU since FCoE uses 2k frames.
+ */
+ if (skb->len > ndev->mtu + ETH_HLEN) {
+ dev_kfree_skb_any(skb);
+ return;
+ }
+
prefetch(skb->data);
skb->dev = ndev;
if (ib_mac_rsp->flags1 & IB_MAC_IOCB_RSP_M_MASK) {