summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/calxeda
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-01-29 21:32:13 +0100
committerDavid S. Miller <davem@davemloft.net>2013-01-29 21:32:13 +0100
commitf1e7b73acc26e8908af783bcd3a9900fd80688f5 (patch)
tree9a9382fb7f12f1889020efb4bffa3f4a88589fc5 /drivers/net/ethernet/calxeda
parentipv6: add anti-spoofing checks for 6to4 and 6rd (diff)
parentMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/po... (diff)
downloadlinux-f1e7b73acc26e8908af783bcd3a9900fd80688f5.tar.xz
linux-f1e7b73acc26e8908af783bcd3a9900fd80688f5.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Bring in the 'net' tree so that we can get some ipv4/ipv6 bug fixes that some net-next work will build upon. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/calxeda')
-rw-r--r--drivers/net/ethernet/calxeda/xgmac.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/calxeda/xgmac.c b/drivers/net/ethernet/calxeda/xgmac.c
index a345e2454b83..a170065b5973 100644
--- a/drivers/net/ethernet/calxeda/xgmac.c
+++ b/drivers/net/ethernet/calxeda/xgmac.c
@@ -548,6 +548,10 @@ static int desc_get_rx_status(struct xgmac_priv *priv, struct xgmac_dma_desc *p)
return -1;
}
+ /* All frames should fit into a single buffer */
+ if (!(status & RXDESC_FIRST_SEG) || !(status & RXDESC_LAST_SEG))
+ return -1;
+
/* Check if packet has checksum already */
if ((status & RXDESC_FRAME_TYPE) && (status & RXDESC_EXT_STATUS) &&
!(ext_status & RXDESC_IP_PAYLOAD_MASK))