All of lore.kernel.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] batman openwrt
@ 2012-02-11  0:36 Gioacchino Mazzurco
  2012-02-11  9:58 ` Marek Lindner
  2012-02-12  5:50 ` Marek Lindner
  0 siblings, 2 replies; 12+ messages in thread
From: Gioacchino Mazzurco @ 2012-02-11  0:36 UTC (permalink / raw)
  To: b.a.t.m.a.n

Hi!

After upgrading to latest batman version on openwt batman stopped adding 
ethernet or bridge interfaces at start...

it add only wireless interfaces

I am using backfire for the core and trunk for packages the problem is related 
to that?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [B.A.T.M.A.N.] batman openwrt
  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-12  5:50 ` Marek Lindner
  1 sibling, 1 reply; 12+ messages in thread
From: Marek Lindner @ 2012-02-11  9:58 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking


Hi,

> After upgrading to latest batman version on openwt batman stopped adding
> ethernet or bridge interfaces at start...
> 
> it add only wireless interfaces
> 
> I am using backfire for the core and trunk for packages the problem is
> related to that?

can you post your /etc/config/batman-adv and as well as the batman-adv package 
version you are using ? Did you switch to the latest and greatest ?

Cheers,
Marek

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [B.A.T.M.A.N.] batman openwrt
  2012-02-11  9:58 ` Marek Lindner
@ 2012-02-11 16:51   ` Gioacchino Mazzurco
  2012-02-11 17:20     ` Marek Lindner
  0 siblings, 1 reply; 12+ messages in thread
From: Gioacchino Mazzurco @ 2012-02-11 16:51 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

Ok so it is not a well known bug

There are some infos:

root@OpenWrt:~# batctl if
ath0: active

root@OpenWrt:~# cat /etc/eigennet/version
Build Info:

OpenWrt
Path: .
URL: svn://svn.openwrt.org/openwrt/branches/backfire
Repository Root: svn://svn.openwrt.org/openwrt
Repository UUID: 3c298f89-4303-0410-b956-a3cf2f4a3e73
Revision: 30330
Node Kind: directory
Schedule: normal
Last Changed Author: jow
Last Changed Rev: 30306
Last Changed Date: 2012-02-05 18:15:40 +0100 (Sun, 05 Feb 2012)

Feeds

packages
Path: .
URL: svn://svn.openwrt.org/openwrt/packages
Repository Root: svn://svn.openwrt.org/openwrt
Repository UUID: 3c298f89-4303-0410-b956-a3cf2f4a3e73
Revision: 30330
Node Kind: directory
Schedule: normal
Last Changed Author: jow
Last Changed Rev: 30328
Last Changed Date: 2012-02-06 12:54:43 +0100 (Mon, 06 Feb 2012)

zzzeigennet
URL: git://gitorious.org/eigennet/packages.git
commit d66e3ad00c920213f0ae5ddaa94e14797256570f
Author: Gioacchino Mazzurco <gmazzurco89@gmail.com>
Date:   Sun Feb 5 18:41:30 2012 +0100

    gw_mode client enabled by default


root@OpenWrt:~# cat /etc/config/batman-adv 

config 'mesh' 'bat0'
        option 'fragmentation' '1'
        option 'gw_mode' 'client'
        list 'interfaces' 'clients'
        list 'interfaces' 'nmeshwifi0'

root@OpenWrt:~# cat /etc/config/network 

config 'interface' 'loopback'
        option 'ifname' 'lo'
        option 'proto' 'static'
        option 'ipaddr' '127.0.0.1'
        option 'netmask' '255.0.0.0'
        option 'ip6addr' '0::1/128'

config 'interface' 'clients'
        option 'proto' 'static'
        option 'type' 'bridge'
        list 'ifname' 'bat0'
        list 'ifname' 'eth0'
        option 'ip6addr' '2001:470:ca42:ee:ab:0015:6DFD:71F6/64'
        option 'ip6gw' '2001:470:ca42:ee:ab::1000'
        option 'ipaddr' '192.168.1.21'
        option 'netmask' '255.255.255.0'

config 'interface' 'nmeshwifi0'
        option 'proto' 'static'
        option 'mtu' '1528'
        option 'ip6addr' 'eeab:20::1/64'
        option 'ipaddr' '192.168.20.21'
        option 'netmask' '255.255.255.0'

root@OpenWrt:~# cat /etc/config/wireless 

config 'wifi-device' 'wifi0'
        option 'type' 'atheros'
        option 'channel' '8'
        option 'disabled' '0'
        option 'txpower' '30'

config 'wifi-iface' 'meshwifi0'
        option 'device' 'wifi0'
        option 'network' 'nmeshwifi0'
        option 'sw_merge' '1'
        option 'mode' 'adhoc'
        option 'bssid' '02:aa:bb:cc:dd:ee'
        option 'ssid' 'www.eigenlab.org-www.ninux.org'
        option 'encryption' 'none'
        option 'mcast_rate' '6000'

config 'wifi-iface' 'apwifi0'
        option 'device' 'wifi0'
        option 'network' 'clients'
        option 'sw_merge' '1'
        option 'mode' 'ap'
        option 'ssid' 'eigenNet'
        option 'encryption' 'none'
        option 'maxassoc' '20'


root@OpenWrt:~# ip a s
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state 
UNKNOWN qlen 1000
    link/ether 00:15:6d:fd:71:f6 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::215:6dff:fefd:71f6/64 scope link 
       valid_lft forever preferred_lft forever
3: br-clients: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state 
UNKNOWN 
    link/ether 00:15:6d:fd:71:f6 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.21/24 brd 192.168.1.255 scope global br-clients
    inet6 2001:470:ca42:ee:ab:15:6dfd:71f6/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::215:6dff:fefd:71f6/64 scope link 
       valid_lft forever preferred_lft forever
4: wifi0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state 
UNKNOWN qlen 195
    link/ieee802.11 00:15:6d:fc:71:f6 brd ff:ff:ff:ff:ff:ff
5: ath0-1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state 
UNKNOWN 
    link/ether 00:15:6d:fc:71:f6 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::215:6dff:fefc:71f6/64 scope link 
       valid_lft forever preferred_lft forever
6: ath0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1528 qdisc noqueue state 
UNKNOWN 
    link/ether 06:15:6d:fc:71:f6 brd ff:ff:ff:ff:ff:ff
    inet 192.168.20.21/24 brd 192.168.20.255 scope global ath0
    inet6 eeab:20::1/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::415:6dff:fefc:71f6/64 scope link 
       valid_lft forever preferred_lft forever
7: bat0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc noqueue 
state UNKNOWN 
    link/ether 26:da:76:30:f6:48 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::24da:76ff:fe30:f648/64 scope link 
       valid_lft forever preferred_lft forever


adding by hand br-clients to batman with batctl if add br-clients work without 
problem the same beaviour on devices where eth0 is not bridged

thanks for help

P.S. as you can see I am using packages from trunk

On Saturday 11 February 2012 17:58:28 Marek Lindner wrote:
> Hi,
> 
> > After upgrading to latest batman version on openwt batman stopped adding
> > ethernet or bridge interfaces at start...
> > 
> > it add only wireless interfaces
> > 
> > I am using backfire for the core and trunk for packages the problem is
> > related to that?
> 
> can you post your /etc/config/batman-adv and as well as the batman-adv
> package version you are using ? Did you switch to the latest and greatest ?
> 
> Cheers,
> Marek

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [B.A.T.M.A.N.] batman openwrt
  2012-02-11 16:51   ` Gioacchino Mazzurco
@ 2012-02-11 17:20     ` Marek Lindner
  2012-02-11 17:37       ` Gioacchino Mazzurco
  0 siblings, 1 reply; 12+ messages in thread
From: Marek Lindner @ 2012-02-11 17:20 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Sunday, February 12, 2012 00:51:53 Gioacchino Mazzurco wrote:
> root@OpenWrt:~# cat /etc/config/batman-adv 
> 
> config 'mesh' 'bat0'
>         option 'fragmentation' '1'
>         option 'gw_mode' 'client'
>         list 'interfaces' 'clients'
>         list 'interfaces' 'nmeshwifi0'


Are you sure this configuration ever worked ?

The default config looks like this:

config 'mesh' 'bat0'
        option 'interfaces' 'mesh'
        option 'aggregated_ogms'
        option 'ap_isolation'
        option 'bonding'
        option 'fragmentation'
        option 'gw_bandwidth'
        option 'gw_mode'
        option 'gw_sel_class'
        option 'log_level'
        option 'orig_interval'
        option 'vis_mode'

# yet another batX instance
# config 'mesh' 'bat5'
#       option 'interfaces' 'second_mesh'


Pay close attention to the "interfaces" option - it is not a list and never 
was.

Regards,
Marek

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [B.A.T.M.A.N.] batman openwrt
  2012-02-11 17:20     ` Marek Lindner
@ 2012-02-11 17:37       ` Gioacchino Mazzurco
  2012-02-11 17:41         ` Marek Lindner
  0 siblings, 1 reply; 12+ messages in thread
From: Gioacchino Mazzurco @ 2012-02-11 17:37 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

Yes that configuration worked in the past here is info from a not recently 
flashed device in ninux pisa and as you can see both eth0 and ath0 are added

moreover use of list in cases like that is the recommended openwrt beaviour so 
if batman package is not working with list it should be fixed ;)

root@OpenWrt:~# cat /etc/eigennet/version 
Build Info:

OpenWrt
Path: .
URL: svn://svn.openwrt.org/openwrt/branches/backfire
Repository Root: svn://svn.openwrt.org/openwrt
Repository UUID: 3c298f89-4303-0410-b956-a3cf2f4a3e73
Revision: 29322
Node Kind: directory
Schedule: normal
Last Changed Author: nico
Last Changed Rev: 29322
Last Changed Date: 2011-11-24 00:24:59 +0100 (Thu, 24 Nov 2011)

Feeds

packages
Path: .
URL: svn://svn.openwrt.org/openwrt/packages
Repository Root: svn://svn.openwrt.org/openwrt
Repository UUID: 3c298f89-4303-0410-b956-a3cf2f4a3e73
Revision: 29322
Node Kind: directory
Schedule: normal
Last Changed Author: nico
Last Changed Rev: 29290
Last Changed Date: 2011-11-21 23:18:50 +0100 (Mon, 21 Nov 2011)

eigennet
URL: git://gitorious.org/eigennet/packages.git
commit cd2a82fcfaf711376c0364510d10857708ed36af
Author: Gioacchino Mazzurco <gmazzurco89@gmail.com>
Date:   Sun Nov 20 20:22:50 2011 +0100

    really stop openwrt firewall if eigennet.network.firewall=0
root@OpenWrt:~# cat /etc/config/batman-adv 

config 'mesh' 'bat0'
        option 'fragmentation' '0'
        list 'interfaces' 'eth0'
        list 'interfaces' 'nmeshwifi0'

root@OpenWrt:~# batctl if
eth0: active
ath0: active
root@OpenWrt:~# cat /etc/config/network 

config 'interface' 'loopback'
        option 'ifname' 'lo'
        option 'proto' 'static'
        option 'ipaddr' '127.0.0.1'
        option 'netmask' '255.0.0.0'
        option 'ip6addr' '0::1/128'

config 'interface' 'bat0'
        option 'proto' 'static'
        option 'ifname' 'bat0'
        option 'ip6addr' '2001:470:ca42:ee:ab:0015:6D73:480D/64'
        option 'ip6gw' '2001:470:ca42:ee:ab::1000'
        option 'ipaddr' '192.168.1.21'
        option 'netmask' '255.255.255.0'

config 'interface' 'eth0'
        option 'ifname' 'eth0'
        option 'proto' 'static'
        option 'ip6addr' 'eeab:10::1/64'
        option 'ipaddr' '192.168.10.21'
        option 'netmask' '255.255.255.0'

config 'interface' 'nmeshwifi0'
        option 'proto' 'static'
        option 'mtu' '1528'
        option 'ip6addr' 'eeab:20::1/64'
        option 'ipaddr' '192.168.20.21'
        option 'netmask' '255.255.255.0'

root@OpenWrt:~# cat /etc/config/wireless 

config 'wifi-device' 'wifi0'
        option 'type' 'atheros'
        option 'channel' '8'
        option 'disabled' '0'
        option 'country' '860'

config 'wifi-iface' 'meshwifi0'
        option 'device' 'wifi0'
        option 'network' 'nmeshwifi0'
        option 'sw_merge' '1'
        option 'mode' 'adhoc'
        option 'bssid' '02:aa:bb:cc:dd:ee'
        option 'ssid' 'www.eigenlab.org-www.ninux.org'
        option 'encryption' 'none'
        option 'mcast_rate' '6000'

On Sunday 12 February 2012 01:20:09 Marek Lindner wrote:
> On Sunday, February 12, 2012 00:51:53 Gioacchino Mazzurco wrote:
> > root@OpenWrt:~# cat /etc/config/batman-adv
> > 
> > config 'mesh' 'bat0'
> > 
> >         option 'fragmentation' '1'
> >         option 'gw_mode' 'client'
> >         list 'interfaces' 'clients'
> >         list 'interfaces' 'nmeshwifi0'
> 
> Are you sure this configuration ever worked ?
> 
> The default config looks like this:
> 
> config 'mesh' 'bat0'
>         option 'interfaces' 'mesh'
>         option 'aggregated_ogms'
>         option 'ap_isolation'
>         option 'bonding'
>         option 'fragmentation'
>         option 'gw_bandwidth'
>         option 'gw_mode'
>         option 'gw_sel_class'
>         option 'log_level'
>         option 'orig_interval'
>         option 'vis_mode'
> 
> # yet another batX instance
> # config 'mesh' 'bat5'
> #       option 'interfaces' 'second_mesh'
> 
> 
> Pay close attention to the "interfaces" option - it is not a list and never
> was.
> 
> Regards,
> Marek

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [B.A.T.M.A.N.] batman openwrt
  2012-02-11 17:37       ` Gioacchino Mazzurco
@ 2012-02-11 17:41         ` Marek Lindner
  2012-02-11 17:58           ` Gioacchino Mazzurco
  0 siblings, 1 reply; 12+ messages in thread
From: Marek Lindner @ 2012-02-11 17:41 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Sunday, February 12, 2012 01:37:22 Gioacchino Mazzurco wrote:
> Yes that configuration worked in the past here is info from a not recently 
> flashed device in ninux pisa and as you can see both eth0 and ath0 are
> added

Then only worked by accident. It never was a list.


> moreover use of list in cases like that is the recommended openwrt beaviour
> so  if batman package is not working with list it should be fixed ;)

It might be a recommended behavior but simply making it a list in the 
configuration file and wondering why it does not work is kind of strange ..

Feel free to post a patch for the OpenWrt package. I'll include it.

Regards,
Marek

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [B.A.T.M.A.N.] batman openwrt
  2012-02-11 17:41         ` Marek Lindner
@ 2012-02-11 17:58           ` Gioacchino Mazzurco
  2012-02-11 18:15             ` Gioacchino Mazzurco
  0 siblings, 1 reply; 12+ messages in thread
From: Gioacchino Mazzurco @ 2012-02-11 17:58 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking


> It might be a recommended behavior but simply making it a list in the
> configuration file and wondering why it does not work is kind of strange ..

ehhe you are right but i was fooled by that
> Then only worked by accident. It never was a list.


I am already working on a patch ;)


On Sunday 12 February 2012 01:41:41 Marek Lindner wrote:
> On Sunday, February 12, 2012 01:37:22 Gioacchino Mazzurco wrote:
> > Yes that configuration worked in the past here is info from a not recently
> > flashed device in ninux pisa and as you can see both eth0 and ath0 are
> > added
> 
> Then only worked by accident. It never was a list.
> 
> > moreover use of list in cases like that is the recommended openwrt
> > beaviour
> > so  if batman package is not working with list it should be fixed ;)
> 
> It might be a recommended behavior but simply making it a list in the
> configuration file and wondering why it does not work is kind of strange ..
> 
> Feel free to post a patch for the OpenWrt package. I'll include it.
> 
> Regards,
> Marek

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [B.A.T.M.A.N.] batman openwrt
  2012-02-11 17:58           ` Gioacchino Mazzurco
@ 2012-02-11 18:15             ` Gioacchino Mazzurco
  2012-02-11 18:30               ` Marek Lindner
  0 siblings, 1 reply; 12+ messages in thread
From: Gioacchino Mazzurco @ 2012-02-11 18:15 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

I am working on a patch but i have some question

here:
./files/etc/hotplug.d/net/99-batman-adv:9:              [ -d 
/sys/class/net/$INTERFACE/mesh/ ] && config_bat "$INTERFACE"

shouldn't it be bat_config intead of config_bat?

i have tried to find config_bat definition but without success :|


On Saturday 11 February 2012 18:58:26 you wrote:
> > It might be a recommended behavior but simply making it a list in the
> > configuration file and wondering why it does not work is kind of strange
> > ..
> 
> ehhe you are right but i was fooled by that
> 
> > Then only worked by accident. It never was a list.
> 
> I am already working on a patch ;)
> 
> On Sunday 12 February 2012 01:41:41 Marek Lindner wrote:
> > On Sunday, February 12, 2012 01:37:22 Gioacchino Mazzurco wrote:
> > > Yes that configuration worked in the past here is info from a not
> > > recently
> > > flashed device in ninux pisa and as you can see both eth0 and ath0 are
> > > added
> > 
> > Then only worked by accident. It never was a list.
> > 
> > > moreover use of list in cases like that is the recommended openwrt
> > > beaviour
> > > so  if batman package is not working with list it should be fixed ;)
> > 
> > It might be a recommended behavior but simply making it a list in the
> > configuration file and wondering why it does not work is kind of strange
> > ..
> > 
> > Feel free to post a patch for the OpenWrt package. I'll include it.
> > 
> > Regards,
> > Marek

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [B.A.T.M.A.N.] batman openwrt
  2012-02-11 18:15             ` Gioacchino Mazzurco
@ 2012-02-11 18:30               ` Marek Lindner
  0 siblings, 0 replies; 12+ messages in thread
From: Marek Lindner @ 2012-02-11 18:30 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Sunday, February 12, 2012 02:15:45 Gioacchino Mazzurco wrote:
> I am working on a patch but i have some question
> 
> here:
> ./files/etc/hotplug.d/net/99-batman-adv:9:              [ -d
> /sys/class/net/$INTERFACE/mesh/ ] && config_bat "$INTERFACE"
> 
> shouldn't it be bat_config intead of config_bat?
> 
> i have tried to find config_bat definition but without success :|

You are right - this is a bug. Filippo already sent me a patch for it but I 
had a few questions regarding other changes in his patch. So, I did not apply 
it yet.

Cheers,
Marek

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [B.A.T.M.A.N.] batman openwrt
  2012-02-11  0:36 [B.A.T.M.A.N.] batman openwrt Gioacchino Mazzurco
  2012-02-11  9:58 ` Marek Lindner
@ 2012-02-12  5:50 ` Marek Lindner
       [not found]   ` <CAFevQmMDLCAgma40kpmcX9AKGbBjzobTiU7ad-Bp3TMcnhODXg@mail.gmail.com>
  2012-03-04 19:15   ` Marek Lindner
  1 sibling, 2 replies; 12+ messages in thread
From: Marek Lindner @ 2012-02-12  5:50 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

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.

Filippo, I cc'ed you because you are the "father" of the hotplug based system. 
Seems we are having some side effects. Any idea how to fix it ?

Regards,
Marek

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [B.A.T.M.A.N.] batman openwrt
       [not found]   ` <CAFevQmMDLCAgma40kpmcX9AKGbBjzobTiU7ad-Bp3TMcnhODXg@mail.gmail.com>
@ 2012-02-12 13:10     ` Marek Lindner
  0 siblings, 0 replies; 12+ messages in thread
From: Marek Lindner @ 2012-02-12 13:10 UTC (permalink / raw)
  To: Filippo Sallemi
  Cc: The list for a Better Approach To Mobile Ad-hoc Networking

On Sunday, February 12, 2012 21:03:20 you wrote:
> 2012/2/12 Marek Lindner <lindner_marek@yahoo.de>:
> > 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.
> > 
> > Filippo, I cc'ed you because you are the "father" of the hotplug based
> > system. Seems we are having some side effects. Any idea how to fix it ?
> > 
> > Regards,
> > Marek
> 
> I need a few more hours and i'll send a full worked patch.

Any particular reason that you always email me privately ?

At this point it would be better to discuss a possible solution first. What if 
your patch does not work ? We can save time by talking about a solution before 
implementing it.

Regards,
Marek

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [B.A.T.M.A.N.] batman openwrt
  2012-02-12  5:50 ` Marek Lindner
       [not found]   ` <CAFevQmMDLCAgma40kpmcX9AKGbBjzobTiU7ad-Bp3TMcnhODXg@mail.gmail.com>
@ 2012-03-04 19:15   ` Marek Lindner
  1 sibling, 0 replies; 12+ messages in thread
From: Marek Lindner @ 2012-03-04 19:15 UTC (permalink / raw)
  To: Gioacchino Mazzurco
  Cc: The list for a Better Approach To Mobile Ad-hoc Networking

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-03-04 19:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.