diff options
author | David S. Miller <davem@davemloft.net> | 2013-01-29 21:32:13 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-29 21:32:13 +0100 |
commit | f1e7b73acc26e8908af783bcd3a9900fd80688f5 (patch) | |
tree | 9a9382fb7f12f1889020efb4bffa3f4a88589fc5 /drivers/net/ethernet/calxeda | |
parent | ipv6: add anti-spoofing checks for 6to4 and 6rd (diff) | |
parent | Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/po... (diff) | |
download | linux-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.c | 4 |
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)) |