summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorVincent CUISSARD <vincent.cuissard@gmail.com>2009-07-16 10:08:58 +0400
committerDavid S. Miller <davem@davemloft.net>2009-07-17 05:06:25 +0400
commit7fefe6a88494b00b151b5ca7bb84daaa781bbca7 (patch)
treeac6283137d3f61019a30bb637c2f3ed05f9f2b37 /drivers
parent869f1c54e9aecde1dfd4349832ce9415a596be8e (diff)
downloadlinux-7fefe6a88494b00b151b5ca7bb84daaa781bbca7.tar.xz
cdc-eem: bad crc checking
When the driver received an EEM packet with CRC option enabled, driver must compute and check the CRC of the Ethernet data. Previous version computes CRC on Ethernet data plus the original CRC value. Skbuff is correctly trimed but the old length is used when CRC is computed. Signed-off-by: Vincent CUISSARD <vincent.cuissard@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/usb/cdc_eem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c
index cd35d50e46d4..45cebfb302cf 100644
--- a/drivers/net/usb/cdc_eem.c
+++ b/drivers/net/usb/cdc_eem.c
@@ -311,7 +311,7 @@ static int eem_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
* bmCRC = 0 : CRC = 0xDEADBEEF
*/
if (header & BIT(14))
- crc2 = ~crc32_le(~0, skb2->data, len);
+ crc2 = ~crc32_le(~0, skb2->data, skb2->len);
else
crc2 = 0xdeadbeef;