public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Marek Lindner <lindner_marek@yahoo.de>
To: Gioacchino Mazzurco <gmazzurco89@gmail.com>
Cc: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] batman openwrt
Date: Mon, 5 Mar 2012 03:15:22 +0800	[thread overview]
Message-ID: <201203050315.23089.lindner_marek@yahoo.de> (raw)
In-Reply-To: <201202121350.22380.lindner_marek@yahoo.de>

[-- Attachment #1: Type: Text/Plain, Size: 889 bytes --]

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


[-- Attachment #2: batman-adv_load-module-when-needed.patch --]
[-- Type: text/x-patch, Size: 1290 bytes --]

--- 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

      parent reply	other threads:[~2012-03-04 19:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-11  0:36 [B.A.T.M.A.N.] batman openwrt Gioacchino Mazzurco
2012-02-11  9:58 ` Marek Lindner
2012-02-11 16:51   ` Gioacchino Mazzurco
2012-02-11 17:20     ` Marek Lindner
2012-02-11 17:37       ` Gioacchino Mazzurco
2012-02-11 17:41         ` Marek Lindner
2012-02-11 17:58           ` Gioacchino Mazzurco
2012-02-11 18:15             ` Gioacchino Mazzurco
2012-02-11 18:30               ` Marek Lindner
2012-02-12  5:50 ` Marek Lindner
     [not found]   ` <CAFevQmMDLCAgma40kpmcX9AKGbBjzobTiU7ad-Bp3TMcnhODXg@mail.gmail.com>
2012-02-12 13:10     ` Marek Lindner
2012-03-04 19:15   ` Marek Lindner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201203050315.23089.lindner_marek@yahoo.de \
    --to=lindner_marek@yahoo.de \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=gmazzurco89@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox