Skip to content

Commit

Permalink
asix: check packet size against mtu+ETH_HLEN instead of ETH_FRAME_LEN
Browse files Browse the repository at this point in the history
Driver checks received packet is too large in asix_rx_fixup() and fails if it is. Problem is
that MTU might be set larger than 1500 and asix fails to work correctly with VLAN tagged
packets. The check should be 'dev->net->mtu + ETH_HLEN' instead.

Tested with AX88772.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jussi Kivilinna authored and David S. Miller committed Jun 7, 2010
1 parent 024a07b commit 9227a46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/usb/asix.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
return 2;
}

if (size > ETH_FRAME_LEN) {
if (size > dev->net->mtu + ETH_HLEN) {
netdev_err(dev->net, "asix_rx_fixup() Bad RX Length %d\n",
size);
return 0;
Expand Down

0 comments on commit 9227a46

Please sign in to comment.