ixgbe: limit small mtu to minimum for ipv4 support
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Fri, 12 Sep 2008 02:56:28 +0000 (19:56 -0700)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 24 Sep 2008 22:54:51 +0000 (18:54 -0400)
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/ixgbe/ixgbe_main.c

index cfaa3ca28f51c224a218145a33b0518fbd0c6dc0..2c8895e9daed0711664d52d515bad65e5365f911 100644 (file)
@@ -2839,8 +2839,8 @@ static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu)
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
        int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN;
 
-       if ((max_frame < (ETH_ZLEN + ETH_FCS_LEN)) ||
-           (max_frame > IXGBE_MAX_JUMBO_FRAME_SIZE))
+       /* MTU < 68 is an error and causes problems on some kernels */
+       if ((new_mtu < 68) || (max_frame > IXGBE_MAX_JUMBO_FRAME_SIZE))
                return -EINVAL;
 
        DPRINTK(PROBE, INFO, "changing MTU from %d to %d\n",