From patchwork Sat Aug 14 21:08:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 289 Return-Path: Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.22]) by open-mesh.net (Postfix) with SMTP id C80771545C5 for ; Sat, 14 Aug 2010 23:08:32 +0200 (CEST) Received: (qmail invoked by alias); 14 Aug 2010 21:08:32 -0000 Received: from unknown (EHLO sven-desktop.lazhur.ath.cx) [89.246.199.18] by mail.gmx.net (mp064) with SMTP; 14 Aug 2010 23:08:32 +0200 X-Authenticated: #15668376 X-Provags-ID: V01U2FsdGVkX1+w8jQo7wOwKg+tmgyuq2/ehmluZmPpRbyTHeBci/ itpLI1Y/1s3dbZ From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Sat, 14 Aug 2010 23:08:05 +0200 Message-Id: <1281820085-13507-9-git-send-email-sven.eckelmann@gmx.de> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1281820085-13507-1-git-send-email-sven.eckelmann@gmx.de> References: <1281820085-13507-1-git-send-email-sven.eckelmann@gmx.de> X-Y-GMX-Trusted: 0 Subject: [B.A.T.M.A.N.] [PATCH 9/9] batman-adv: Don't increase mtu of interface automatically X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Aug 2010 21:08:34 -0000 The user usually sets a mtu by hand and don't want to have software to change it automatically. This is only needed when we must reduce the mtu due to a low mtu of an active slave device, but we should not increase it when any other action is made on the system related to the used interfaces. Signed-off-by: Sven Eckelmann --- batman-adv/hard-interface.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/batman-adv/hard-interface.c b/batman-adv/hard-interface.c index ee02050..eb26026 100644 --- a/batman-adv/hard-interface.c +++ b/batman-adv/hard-interface.c @@ -201,7 +201,7 @@ void update_min_mtu(struct net_device *soft_iface) int min_mtu; min_mtu = hardif_min_mtu(soft_iface); - if (soft_iface->mtu != min_mtu) + if (soft_iface->mtu > min_mtu) soft_iface->mtu = min_mtu; } @@ -241,8 +241,6 @@ static void hardif_deactivate_interface(struct batman_if *batman_if) bat_info(batman_if->soft_iface, "Interface deactivated: %s\n", batman_if->net_dev->name); - - update_min_mtu(batman_if->soft_iface); } int hardif_enable_interface(struct batman_if *batman_if, char *iface_name)