From patchwork Sun Mar 4 19:15:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Lindner X-Patchwork-Id: 1595 Return-Path: Received: from nm21-vm7.bullet.mail.ukl.yahoo.com (nm21-vm7.bullet.mail.ukl.yahoo.com [217.12.10.79]) by open-mesh.org (Postfix) with SMTP id 6B9556007B5 for ; Sun, 4 Mar 2012 20:15:35 +0100 (CET) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@yahoo.de; dkim-adsp=none Received: from [217.146.183.181] by nm21.bullet.mail.ukl.yahoo.com with NNFMP; 04 Mar 2012 19:15:35 -0000 Received: from [77.238.184.80] by tm12.bullet.mail.ukl.yahoo.com with NNFMP; 04 Mar 2012 19:15:35 -0000 Received: from [127.0.0.1] by smtp149.mail.ukl.yahoo.com with NNFMP; 04 Mar 2012 19:15:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s1024; t=1330888535; bh=SYi07yQyR2MvgN4UNdQrOuHu7S3wyxLHcYPTXdVGDQE=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:From:To:Subject:Date:User-Agent:References:In-Reply-To:Cc:MIME-Version:Content-Type:Message-Id; b=VMlQ8/OsDk4UAe5knZZZwd32L2qBPCi4wAfQITv9Gv775YPM5OlQBrGM0Ys+7JOjdUSxrzB4q09ThNa5lE+c6lNUWU97FYZsoFq5+WVjCDds3vYZxx39sv9RGsUDsOJq9e+UbhQpKwe/xHAD7E6Qu7NO2CGVfL2uVQyDJmQTUUM= X-Yahoo-Newman-Id: 187930.82978.bm@smtp149.mail.ukl.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 8496J6sVM1lv8GiqzHK7O45TE4WG7zquSmXFSacixVNdxSm c6Z0irGo1pnt_GvQ89MvcNR6bHZQXCMGf9M1gq3reFZQoeLagb1NV4Es7e2e jCgtsk5naOOqgjIm_m6B8S6CsxwL4yDoiMoSr77r5sMkE3eBVs4LrWJGKOoY EFLJbtKPT7a8DAO3HrkmStbkta0MhkQzaHdeWZD.aKM0LHqxiP20_KdqiRml ygQoIVhN4zFuhiAECZXODBu52HC8R.Ik_HY2LRBC58nYRaNbBYHQXgVStlPP 67WZKKd4qG1nQLEEwRrTs0jhW3Pce0AdP5M6x8ODKth.w1HHUN0mSLvjLdj1 OxW0m3WBg6OMHXt6NI3nCoaMUaqlJWfUUsXJ4IgCsMYd5_mrkL43E37MjSS0 JOc2E6Q7KrJ7o8Idl31VkR66losxo4G1dwPxIJJbubA.icfhu2.GLZulwgbt T7Aa1gzrztpkhMcuhVd9xgyvV3mdjXfCOJJ8geQ-- X-Yahoo-SMTP: tW.h3tiswBBMXO2coYcbPigGD5Lt6zY_.Zc- Received: from turgot.localnet (lindner_marek@119.236.110.45 with plain) by smtp149.mail.ukl.yahoo.com with SMTP; 04 Mar 2012 19:15:34 +0000 GMT From: Marek Lindner To: Gioacchino Mazzurco Date: Mon, 5 Mar 2012 03:15:22 +0800 User-Agent: KMail/1.13.7 (Linux/3.0.0-1-amd64; KDE/4.6.5; x86_64; ; ) References: <1807712.xKAsDcUsSn@g10h4cklab> <201202121350.22380.lindner_marek@yahoo.de> In-Reply-To: <201202121350.22380.lindner_marek@yahoo.de> MIME-Version: 1.0 Message-Id: <201203050315.23089.lindner_marek@yahoo.de> Cc: The list for a Better Approach To Mobile Ad-hoc Networking Subject: Re: [B.A.T.M.A.N.] batman openwrt X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 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: Sun, 04 Mar 2012 19:15:35 -0000 On Sunday, February 12, 2012 13:50:21 Marek Lindner wrote: > On Saturday, February 11, 2012 08:36:22 Gioacchino Mazzurco wrote: > > After upgrading to latest batman version on openwt batman stopped adding > > ethernet or bridge interfaces at start... > > > > it add only wireless interfaces > > Last night we got to the bottom of this. The new hotplug based system is at > the core of the issue: The Ethernet driver on the device is compiled into > the kernel, thus loaded before the batman-adv kernel module is loaded. As > a result the "interface add" event is triggered before batman-adv is > active and the device can't be added to the batman-adv mesh. Attached to this mail you'll find a patch for the hotplug scripts. Jow suggested to simply load the kernel module when it is not loaded. Could you test the patch and let me know whether it fixes your problem ? Regards, Marek --- a/batman-adv/files/lib/batman-adv/config.sh (revision 30804) +++ b/batman-adv/files/lib/batman-adv/config.sh (working copy) @@ -1,6 +1,15 @@ #!/bin/sh -bat_config(){ +bat_load_module() +{ + [ -d "/sys/module/batman_adv/" ] && return + + . /etc/functions.sh + load_modules /etc/modules.d/*-lib-crc16 /etc/modules.d/*-batman-adv +} + +bat_config() +{ local mesh="$1" local aggregated_ogms bonding fragmentation gw_bandwidth gw_mode gw_sel_class log_level orig_interval hop_penalty vis_mode @@ -30,7 +39,8 @@ } -bat_add_interface(){ +bat_add_interface() +{ local mesh="$1" local interface="$2" local interfaces @@ -47,7 +57,8 @@ done } -bat_del_interface(){ +bat_del_interface() +{ local mesh="$1" local interface="$2" local interfaces --- a/batman-adv/files/usr/sbin/batman-adv (revision 30804) +++ b/batman-adv/files/usr/sbin/batman-adv (working copy) @@ -26,6 +26,7 @@ # can also be used with "batman-adv start bat0" start() { + bat_load_module config_load batman-adv if [ -n "$1" ]; then --- a/batman-adv/files/etc/hotplug.d/net/99-batman-adv (revision 30804) +++ b/batman-adv/files/etc/hotplug.d/net/99-batman-adv (working copy) @@ -2,6 +2,7 @@ . /lib/batman-adv/config.sh +bat_load_module config_load batman-adv case "$ACTION" in