From: Alexander Duyck Date: Tue, 27 Oct 2009 23:52:13 +0000 (+0000) Subject: igb: limit minimum mtu to 68 to keep ip bound to interface X-Git-Tag: MMI-PSA29.97-13-9~25754^2~649 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c809d2276cb035228cd9e83e2ca7d2b902c61cef;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git igb: limit minimum mtu to 68 to keep ip bound to interface Limit the minimum mtu to 68 in order to prevent ip from being unbound from the interface. Signed-off-by: Alexander Duyck Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller --- diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 264ff005710b..846e64f0ad86 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c @@ -3709,8 +3709,7 @@ static int igb_change_mtu(struct net_device *netdev, int new_mtu) int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN; u32 rx_buffer_len, i; - if ((max_frame < ETH_ZLEN + ETH_FCS_LEN) || - (max_frame > MAX_JUMBO_FRAME_SIZE)) { + if ((new_mtu < 68) || (max_frame > MAX_JUMBO_FRAME_SIZE)) { dev_err(&pdev->dev, "Invalid MTU setting\n"); return -EINVAL; }