From patchwork Wed Oct 28 09:52:13 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kirsher, Jeffrey T" X-Patchwork-Id: 37083 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 4CA8AB7BC2 for ; Wed, 28 Oct 2009 20:56:29 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753007AbZJ1Jz5 (ORCPT ); Wed, 28 Oct 2009 05:55:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752774AbZJ1Jz5 (ORCPT ); Wed, 28 Oct 2009 05:55:57 -0400 Received: from qmta14.emeryville.ca.mail.comcast.net ([76.96.27.212]:54147 "EHLO QMTA14.emeryville.ca.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752711AbZJ1Jz4 (ORCPT ); Wed, 28 Oct 2009 05:55:56 -0400 Received: from OMTA13.emeryville.ca.mail.comcast.net ([76.96.30.52]) by QMTA14.emeryville.ca.mail.comcast.net with comcast id y9tl1c00B17UAYkAE9w2Ew; Wed, 28 Oct 2009 09:56:02 +0000 Received: from localhost.localdomain ([63.64.152.142]) by OMTA13.emeryville.ca.mail.comcast.net with comcast id y9vm1c00434bfcX8Z9vo41; Wed, 28 Oct 2009 09:56:00 +0000 From: Jeff Kirsher Subject: [net-next-2.6 PATCH 21/23] igb: limit minimum mtu to 68 to keep ip bound to interface To: davem@davemloft.net Cc: netdev@vger.kernel.org, gospo@redhat.com, Alexander Duyck , Jeff Kirsher Date: Wed, 28 Oct 2009 02:52:13 -0700 Message-ID: <20091028095212.13156.22570.stgit@localhost.localdomain> In-Reply-To: <20091028094540.13156.2637.stgit@localhost.localdomain> References: <20091028094540.13156.2637.stgit@localhost.localdomain> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Alexander Duyck 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 --- drivers/net/igb/igb_main.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 264ff00..846e64f 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; }