]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
asix: check packet size against mtu+ETH_HLEN instead of ETH_FRAME_LEN
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>
Mon, 7 Jun 2010 07:56:27 +0000 (00:56 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Jun 2010 07:56:27 +0000 (00:56 -0700)
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>
drivers/net/usb/asix.c

index 1f802e90474c3ccd342a70fb8b7352cadedf6bcd..9516f382a6baf76dfdafe63afdd3b22380a2595f 100644 (file)
@@ -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;