* [B.A.T.M.A.N.] basic B.A.T.M.A.N-adv setup
@ 2009-10-20 15:02 Francesco
2009-10-20 15:17 ` Sven Eckelmann
2009-10-20 15:33 ` Marek Lindner
0 siblings, 2 replies; 17+ messages in thread
From: Francesco @ 2009-10-20 15:02 UTC (permalink / raw)
To: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 928 bytes --]
Hi all,
i'm starting a B.A.T.M.A.N. mesh testbed, i've read some messages to find
some answers but no luck.
I'll try to explain what I've done and the errors i get..hope i get some
help in here.
From the beginning, I am using batman-adv 3.2 compiled along with batctl.
Only one wireless interface (wlan0) on each linux box (5 boxes by now)
Here are commands I fire on each node:
$ insmod batman-adv.ko
$ iwconfig wlan0 mode ad-hoc essid BATMAN_NET
$ echo wlan0 > /proc/net/batman-adv/interfaces
$ ifconfig wlan0 192.168.1.xxx up
$ ifconfig bat0 up
I get a new bat0 interface, iwconfig shows nodes properly part of the ad-hoc
network.
I see correct $batctl o output but i cannot $batctl ping $mac_address
There are no bridges between interfaces. I just want to run batman-adv on
wlan0.
Do I need to set an IP address for wlan0, for bat0 or for both?
Or I have to bridge bat0 and wlan0 together?
--
Francesco Cappuccio
[-- Attachment #2: Type: text/html, Size: 1059 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [B.A.T.M.A.N.] basic B.A.T.M.A.N-adv setup
2009-10-20 15:02 [B.A.T.M.A.N.] basic B.A.T.M.A.N-adv setup Francesco
@ 2009-10-20 15:17 ` Sven Eckelmann
2009-10-20 15:23 ` Sven Eckelmann
2009-10-20 16:02 ` Francesco
2009-10-20 15:33 ` Marek Lindner
1 sibling, 2 replies; 17+ messages in thread
From: Sven Eckelmann @ 2009-10-20 15:17 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
[-- Attachment #1: Type: Text/Plain, Size: 1272 bytes --]
Francesco wrote:
> Hi all,
> i'm starting a B.A.T.M.A.N. mesh testbed, i've read some messages to find
> some answers but no luck.
> I'll try to explain what I've done and the errors i get..hope i get some
> help in here.
>
> >From the beginning, I am using batman-adv 3.2 compiled along with batctl.
There is nothing like batman-adv 3.2. Where did you got it from?
> Only one wireless interface (wlan0) on each linux box (5 boxes by now)
> Here are commands I fire on each node:
>
> $ insmod batman-adv.ko
> $ iwconfig wlan0 mode ad-hoc essid BATMAN_NET
> $ echo wlan0 > /proc/net/batman-adv/interfaces
> $ ifconfig wlan0 192.168.1.xxx up
> $ ifconfig bat0 up
You must give bat0 also an ip to use IPv4(/6) over it... in most cases only
bat0 as it is just the hardware interface the bat0 interface is using.
If you only want to test raw ethernet data over bat0 this should work.
> I get a new bat0 interface, iwconfig shows nodes properly part of the
> ad-hoc network.
> I see correct $batctl o output but i cannot $batctl ping $mac_address
Can you please give the originator table and send some small dumps (tcpdump -
w, batctl td) of both nodes when you try to send a batctl ping?
What mac address did you use?
Best regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [B.A.T.M.A.N.] basic B.A.T.M.A.N-adv setup
2009-10-20 15:17 ` Sven Eckelmann
@ 2009-10-20 15:23 ` Sven Eckelmann
2009-10-20 16:02 ` Francesco
1 sibling, 0 replies; 17+ messages in thread
From: Sven Eckelmann @ 2009-10-20 15:23 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
[-- Attachment #1: Type: Text/Plain, Size: 421 bytes --]
Sven Eckelmann wrote:
> You must give bat0 also an ip to use IPv4(/6) over it... in most cases only
> bat0 as it is just the hardware interface the bat0 interface is using.
> If you only want to test raw ethernet data over bat0 this should work.
Meant that wlan0 is just the hardware interface bat0 is using.
> > Or I have to bridge bat0 and wlan0 together?
No, you should not bridge them together.
Best regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [B.A.T.M.A.N.] basic B.A.T.M.A.N-adv setup
2009-10-20 15:02 [B.A.T.M.A.N.] basic B.A.T.M.A.N-adv setup Francesco
2009-10-20 15:17 ` Sven Eckelmann
@ 2009-10-20 15:33 ` Marek Lindner
1 sibling, 0 replies; 17+ messages in thread
From: Marek Lindner @ 2009-10-20 15:33 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
Hi,
> From the beginning, I am using batman-adv 3.2 compiled along with batctl.
batman-adv 3.2 ? I guess you mean 0.2 ?
> $ insmod batman-adv.ko
> $ iwconfig wlan0 mode ad-hoc essid BATMAN_NET
> $ echo wlan0 > /proc/net/batman-adv/interfaces
> $ ifconfig wlan0 192.168.1.xxx up
> $ ifconfig bat0 up
The wlan0 device does not need an IP address. It needs to be up & running but
the IP goes on the bat0 device.
> I get a new bat0 interface, iwconfig shows nodes properly part of the
> ad-hoc network.
> I see correct $batctl o output but i cannot $batctl ping $mac_address
Would you mind showing us the batctl o output and the batctl ping call plus
error message(s) ?
> There are no bridges between interfaces. I just want to run batman-adv on
> wlan0.
> Do I need to set an IP address for wlan0, for bat0 or for both?
> Or I have to bridge bat0 and wlan0 together?
No, don't bridge bat0 and wlan0. Imagine you had another wifi interface in
managed mode for non-batman nodes to connect to (e.g. wlan1). Then you would
want to make the mesh accessible for the managed clients by bridging bat0 with
wlan1.
Regards,
Marek
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [B.A.T.M.A.N.] basic B.A.T.M.A.N-adv setup
2009-10-20 15:17 ` Sven Eckelmann
2009-10-20 15:23 ` Sven Eckelmann
@ 2009-10-20 16:02 ` Francesco
2009-10-20 17:10 ` Sven Eckelmann
1 sibling, 1 reply; 17+ messages in thread
From: Francesco @ 2009-10-20 16:02 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
[-- Attachment #1: Type: text/plain, Size: 3326 bytes --]
Hi Sven,
> There is nothing like batman-adv 3.2. Where did you got it from?
>
Sorry, my fault, i meant 0.3.2 release.
>
> > Only one wireless interface (wlan0) on each linux box (5 boxes by now)
> > Here are commands I fire on each node:
> >
> > $ insmod batman-adv.ko
> > $ iwconfig wlan0 mode ad-hoc essid BATMAN_NET
> > $ echo wlan0 > /proc/net/batman-adv/interfaces
> > $ ifconfig wlan0 192.168.1.xxx up
> > $ ifconfig bat0 up
>
> You must give bat0 also an ip to use IPv4(/6) over it... in most cases only
> bat0 as it is just the hardware interface the bat0 interface is using.
> If you only want to test raw ethernet data over bat0 this should work.
>
Ok now i have assigned ip addresses only to bat0 interface, i do ping nodes
with ping command.
here are some output:
$batctl o
Originator (#/255) Nexthop [outgoingIF]: Potential
nexthops ... [B.A.T.M.A.N. Adv 0.1, MainIF/MAC: wlan0/00:0b:6b:34:88:94]
00:0c:42:2c:d8:fc (221) 00:1e:4c:02:94:95 [ wlan0]: 00:0c:42:2c:d8:fc
(170) 00:0b:6b:2f:53:09 (148) 00:0b:6b:2f:53:03 (199) 00:1e:4c:02:94:95
(221)
00:0b:6b:2f:53:03 (220) 00:0b:6b:2f:53:03 [ wlan0]: 00:0b:6b:2f:53:03
(220) 00:0b:6b:2f:53:09 (146) 00:0c:42:2c:d8:fc (157) 00:1e:4c:02:94:95
(201)
00:1e:4c:02:94:95 (234) 00:1e:4c:02:94:95 [ wlan0]: 00:1e:4c:02:94:95
(234) 00:0b:6b:2f:53:03 (191) 00:0b:6b:2f:53:09 (146) 00:0c:42:2c:d8:fc
(157)
00:0b:6b:2f:53:09 (194) 00:1e:4c:02:94:95 [ wlan0]: 00:0b:6b:2f:53:09
(157) 00:0b:6b:2f:53:03 (183) 00:0c:42:2c:d8:fc (138) 00:1e:4c:02:94:95 (19
It shows 4 of 5 nodes I have online at this very moment.
Say i fire ping from the box missing:
root@francesco-desktop:/home/francesco# ping 192.168.1.2
PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.
64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=3.16 ms
64 bytes from 192.168.1.2: icmp_seq=2 ttl=64 time=3.55 ms
64 bytes from 192.168.1.2: icmp_seq=3 ttl=64 time=8.01 ms
^C
--- 192.168.1.2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2011ms
rtt min/avg/max/mdev = 3.167/4.911/8.012/2.198 ms
Everything ok. But if I try to batctl ping a node that I can see with
$batctl o:
root@francesco-desktop:/home/francesco# batctl ping 00:0b:6b:2f:53:03
PING 00:0b:6b:2f:53:03 (00:0b:6b:2f:53:03) 19(47) bytes of data
From 00:0b:6b:2f:53:03: Destination Host Unreachable (icmp_seq 6170)
From 00:0b:6b:2f:53:03: Destination Host Unreachable (icmp_seq 6170)
From 00:0b:6b:2f:53:03: Destination Host Unreachable (icmp_seq 6170)
^C--- 00:0b:6b:2f:53:03 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss
rtt min/avg/max/mdev = 0.000/0.000/0.000/0.000 ms
What am I missing? I will post dump files tomorrow when i get back in the
lab.
Thanks.
>
> > I get a new bat0 interface, iwconfig shows nodes properly part of the
> > ad-hoc network.
> > I see correct $batctl o output but i cannot $batctl ping $mac_address
> Can you please give the originator table and send some small dumps (tcpdump
> -
> w, batctl td) of both nodes when you try to send a batctl ping?
> What mac address did you use?
>
> Best regards,
> Sven
>
> _______________________________________________
> B.A.T.M.A.N mailing list
> B.A.T.M.A.N@lists.open-mesh.net
> https://lists.open-mesh.net/mm/listinfo/b.a.t.m.a.n
>
>
--
Francesco Cappuccio
[-- Attachment #2: Type: text/html, Size: 4668 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [B.A.T.M.A.N.] basic B.A.T.M.A.N-adv setup
2009-10-20 16:02 ` Francesco
@ 2009-10-20 17:10 ` Sven Eckelmann
2009-10-20 17:17 ` Sven Eckelmann
0 siblings, 1 reply; 17+ messages in thread
From: Sven Eckelmann @ 2009-10-20 17:10 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
[-- Attachment #1: Type: Text/Plain, Size: 1878 bytes --]
Francesco wrote:
> Hi Sven,
>
> > There is nothing like batman-adv 3.2. Where did you got it from?
>
> Sorry, my fault, i meant 0.3.2 release.
There is no 0.3.2 release. batman-adv hasn't reached 0.2 yet. See
http://downloads.open-mesh.net/batman/releases/ for the current releases of
batman and batman-adv. The current version of batman-adv in development is
<0.2-beta (it is not known yet if there will be real a beta or if the next
release is simply 0.2). So the current snapshot of batman-adv would be
"B.A.T.M.A.N. advanced 0.2-beta r1453 (compatibility version 8)"
[...]
> It shows 4 of 5 nodes I have online at this very moment.
>
> Say i fire ping from the box missing:
>
> root@francesco-desktop:/home/francesco# ping 192.168.1.2
> PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.
> 64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=3.16 ms
> 64 bytes from 192.168.1.2: icmp_seq=2 ttl=64 time=3.55 ms
> 64 bytes from 192.168.1.2: icmp_seq=3 ttl=64 time=8.01 ms
> ^C
> --- 192.168.1.2 ping statistics ---
> 3 packets transmitted, 3 received, 0% packet loss, time 2011ms
> rtt min/avg/max/mdev = 3.167/4.911/8.012/2.198 ms
>
> Everything ok. But if I try to batctl ping a node that I can see with
> $batctl o:
>
> root@francesco-desktop:/home/francesco# batctl ping 00:0b:6b:2f:53:03
> PING 00:0b:6b:2f:53:03 (00:0b:6b:2f:53:03) 19(47) bytes of data
>
> >From 00:0b:6b:2f:53:03: Destination Host Unreachable (icmp_seq 6170)
> >From 00:0b:6b:2f:53:03: Destination Host Unreachable (icmp_seq 6170)
> >From 00:0b:6b:2f:53:03: Destination Host Unreachable (icmp_seq 6170)
If you say that normal ping over bat0 works I would guess that you are using a
wrong combination of batctl and kernel module. Please use bleeding edge svn
batctl only with bleeding edge svn batman-adv-kernelland module.
Best regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [B.A.T.M.A.N.] basic B.A.T.M.A.N-adv setup
2009-10-20 17:10 ` Sven Eckelmann
@ 2009-10-20 17:17 ` Sven Eckelmann
2009-10-20 19:59 ` Francesco
0 siblings, 1 reply; 17+ messages in thread
From: Sven Eckelmann @ 2009-10-20 17:17 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
[-- Attachment #1: Type: Text/Plain, Size: 240 bytes --]
Just to highlight it:
> > nexthops ... [B.A.T.M.A.N. Adv 0.1, MainIF/MAC: wlan0/00:0b:6b:34:88:94]
batctl isn't compatible with batman-adv 0.1. It was called battool when
batman-adv-kernelland 0.1 was released.
Best regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [B.A.T.M.A.N.] basic B.A.T.M.A.N-adv setup
2009-10-20 17:17 ` Sven Eckelmann
@ 2009-10-20 19:59 ` Francesco
2009-10-20 20:22 ` Sven Eckelmann
0 siblings, 1 reply; 17+ messages in thread
From: Francesco @ 2009-10-20 19:59 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
[-- Attachment #1: Type: text/plain, Size: 597 bytes --]
Hi Sven,now I see what was wrong, I'm really feeling so stupid.. :)
It was misleading that I reached the batman-adv download page (
http://downloads.open-mesh.net/batman/stable/sources/batman-adv-kernelland/ )
browsing batman 0.3.2 download page (
http://www.open-mesh.org/wiki/2009-06-13-batman-0-3-2-release ) and I got
confused.
Thanks for your kind reply.
I didn't read enough about batctl and its use against most recent batman-adv
version.
My fault.
As soon as i get back to the lab I'll try latetest version of both
batman-adv and batctl and see what comes out.
--
Francesco Cappuccio
[-- Attachment #2: Type: text/html, Size: 922 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [B.A.T.M.A.N.] basic B.A.T.M.A.N-adv setup
2009-10-20 19:59 ` Francesco
@ 2009-10-20 20:22 ` Sven Eckelmann
2009-10-21 6:54 ` Francesco
0 siblings, 1 reply; 17+ messages in thread
From: Sven Eckelmann @ 2009-10-20 20:22 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
[-- Attachment #1: Type: Text/Plain, Size: 1462 bytes --]
Francesco wrote:
> Hi Sven,now I see what was wrong, I'm really feeling so stupid.. :)
> It was misleading that I reached the batman-adv download page (
> http://downloads.open-mesh.net/batman/stable/sources/batman-adv-kernelland/
> ) browsing batman 0.3.2 download page (
> http://www.open-mesh.org/wiki/2009-06-13-batman-0-3-2-release ) and I got
> confused.
No reason to feel stupid. You aren't the first person which got confused by
the different implementations of the B.A.T.M.A.N. algorithm.
> I didn't read enough about batctl and its use against most recent
> batman-adv version.
> My fault.
>
> As soon as i get back to the lab I'll try latetest version of both
> batman-adv and batctl and see what comes out.
There is currently nothing like a stable branch. So if you want to have 0.1
with some backported stabilization patches you should look at the Debian
package of batman-adv-kernelland[1] and batman-adv-battool[2]. The source
packages of both packages include the separated patches[3].
But if you are currently in lab testing I would recommend to use both from svn
as batctl has some nice new features and changes in batman-adv-kernelland are
also looking quite interesting.
Best regards,
Sven
[1] http://packages.debian.org/sid/batman-adv-source
[2] http://packages.debian.org/sid/batman-adv-battool
[3] http://git.debian.org/?p=collab-maint/batman-adv-kernelland.git;a=tree;f=debian/patches;hb=master
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [B.A.T.M.A.N.] basic B.A.T.M.A.N-adv setup
2009-10-20 20:22 ` Sven Eckelmann
@ 2009-10-21 6:54 ` Francesco
2009-10-21 7:05 ` Andrew Lunn
0 siblings, 1 reply; 17+ messages in thread
From: Francesco @ 2009-10-21 6:54 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]
HI all,
I've now downloaded and $make latest batman-adv trunk from
$svn co
http://downloads.open-mesh.net/svn/batman/trunk/batman-adv-kernelland/
I have issues with batctl trunk:
$svn co http://downloads.open-mesh.net/svn/batman/trunk/batctl/
Download is ok but when i fire
$ make
root@francesco-desktop:/home/francesco/batctl# make
make -j 1 batctl
make[1]: Entering directory `/home/francesco/batctl'
CC main.o
In file included from main.c:34:
tcpdump.h:23:25: error: list-batman.h: No such file or directory
In file included from main.c:34:
tcpdump.h:33: error: field ‘list’ has incomplete type
In file included from main.c:35:
bisect.h:30: error: field ‘event_list’ has incomplete type
bisect.h:31: error: field ‘rt_table_list’ has incomplete type
bisect.h:36: error: field ‘list’ has incomplete type
bisect.h:47: error: field ‘list’ has incomplete type
bisect.h:65: error: field ‘list’ has incomplete type
make[1]: *** [main.o] Error 1
make[1]: Leaving directory `/home/francesco/batctl'
make: *** [all] Error 2
I suppose there was no need to uninstall old batctl i did compiled..or not?
Thanks.
--
Francesco Cappuccio
[-- Attachment #2: Type: text/html, Size: 1443 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [B.A.T.M.A.N.] basic B.A.T.M.A.N-adv setup
2009-10-21 6:54 ` Francesco
@ 2009-10-21 7:05 ` Andrew Lunn
2009-10-21 7:35 ` Francesco
0 siblings, 1 reply; 17+ messages in thread
From: Andrew Lunn @ 2009-10-21 7:05 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
On Wed, Oct 21, 2009 at 08:54:02AM +0200, Francesco wrote:
> HI all,
> I've now downloaded and $make latest batman-adv trunk from
> $svn co
> http://downloads.open-mesh.net/svn/batman/trunk/batman-adv-kernelland/
> I have issues with batctl trunk:
> $svn co http://downloads.open-mesh.net/svn/batman/trunk/batctl/
This unfortunately, does not work. The batctl sources has symbolic
links into the batman directory for the files hash.c, list-batman.c,
hash.h list-batman.h.
Check out the complete trunk and then you will have everything you
need.
Andrew
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [B.A.T.M.A.N.] basic B.A.T.M.A.N-adv setup
2009-10-21 7:05 ` Andrew Lunn
@ 2009-10-21 7:35 ` Francesco
2009-10-21 10:00 ` Sven Eckelmann
0 siblings, 1 reply; 17+ messages in thread
From: Francesco @ 2009-10-21 7:35 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
[-- Attachment #1: Type: text/plain, Size: 1345 bytes --]
Hi Andrew,
it (obviously) worked, i got the trunk, make and make install batctl after
batman-adv.
Weird that:
$batctl o
BATMAN disabled - primary interface not active
I just run this script:
insmod /home/francesco/trunk/batman-adv-kernelland/batman-adv.ko
ifconfig wlan0 down
iwconfig wlan0 mode ad-hoc essid BATMAN_NET
echo wlan0 > /proc/net/batman-adv/interfaces
ifconfig wlan0 up
ifconfig bat0 192.168.1.1 up
What is wrong?
I did the same in two mesh nodes with the same result..
On Wed, Oct 21, 2009 at 9:05 AM, Andrew Lunn <andrew@lunn.ch> wrote:
> On Wed, Oct 21, 2009 at 08:54:02AM +0200, Francesco wrote:
> > HI all,
> > I've now downloaded and $make latest batman-adv trunk from
> > $svn co
> > http://downloads.open-mesh.net/svn/batman/trunk/batman-adv-kernelland/
> > I have issues with batctl trunk:
> > $svn co http://downloads.open-mesh.net/svn/batman/trunk/batctl/
>
> This unfortunately, does not work. The batctl sources has symbolic
> links into the batman directory for the files hash.c, list-batman.c,
> hash.h list-batman.h.
>
> Check out the complete trunk and then you will have everything you
> need.
>
> Andrew
> _______________________________________________
> B.A.T.M.A.N mailing list
> B.A.T.M.A.N@lists.open-mesh.net
> https://lists.open-mesh.net/mm/listinfo/b.a.t.m.a.n
>
--
Francesco Cappuccio
[-- Attachment #2: Type: text/html, Size: 2200 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [B.A.T.M.A.N.] basic B.A.T.M.A.N-adv setup
2009-10-21 7:35 ` Francesco
@ 2009-10-21 10:00 ` Sven Eckelmann
2009-10-21 12:00 ` Sven Eckelmann
2009-10-21 12:11 ` [B.A.T.M.A.N.] basic B.A.T.M.A.N-adv setup Francesco
0 siblings, 2 replies; 17+ messages in thread
From: Sven Eckelmann @ 2009-10-21 10:00 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking; +Cc: Marek Lindner
[-- Attachment #1: Type: Text/Plain, Size: 660 bytes --]
Francesco wrote:
> Hi Andrew,
> it (obviously) worked, i got the trunk, make and make install batctl after
> batman-adv.
>
> Weird that:
> $batctl o
> BATMAN disabled - primary interface not active
>
> I just run this script:
>
> insmod /home/francesco/trunk/batman-adv-kernelland/batman-adv.ko
> ifconfig wlan0 down
> iwconfig wlan0 mode ad-hoc essid BATMAN_NET
> echo wlan0 > /proc/net/batman-adv/interfaces
> ifconfig wlan0 up
> ifconfig bat0 192.168.1.1 up
>
> What is wrong?
I think that you found a bug in batman-adv. Please add the wlan0 interface to
/proc/net/batman-adv/interfaces when wlan0 is up.
Best regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [B.A.T.M.A.N.] basic B.A.T.M.A.N-adv setup
2009-10-21 10:00 ` Sven Eckelmann
@ 2009-10-21 12:00 ` Sven Eckelmann
2009-10-21 15:26 ` [B.A.T.M.A.N.] [PATCH] Start to send originator messages when interface gets active Sven Eckelmann
2009-10-21 12:11 ` [B.A.T.M.A.N.] basic B.A.T.M.A.N-adv setup Francesco
1 sibling, 1 reply; 17+ messages in thread
From: Sven Eckelmann @ 2009-10-21 12:00 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
[-- Attachment #1: Type: Text/Plain, Size: 1125 bytes --]
Sven Eckelmann wrote:
> I think that you found a bug in batman-adv. Please add the wlan0 interface
> to /proc/net/batman-adv/interfaces when wlan0 is up.
Ok, problem is that the interface starts as IF_INACTIVE, then switches to
IF_TO_BE_ACTIVATED when you activate it with ifconfig, but never reaches
IF_ACTIVE.
It should get the IF_TO_BE_ACTIVATED status in hardif_activate_interface and
the IF_ACTIVE in schedule_own_packet. I would guess that this function is
never called in that situation.
Following called-by tree:
- schedule_own_packet
- send_outstanding_bat_packet
- new_aggregated_packet (indirect over worker queue)
- add_bat_packet_to_list
- schedule_own_packet (who sees the loop here?)
- schedule_forward_packet
- hardif_add_interface
I would guess that either schedule_own_packet must be moved to
hardif_activate_interface or the worker queue must be started otherwise when
hardif_activate_interface is called in hard_if_event. I would leave the that
to Marek as he knows what side effects are problematic in that situation
Best regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [B.A.T.M.A.N.] basic B.A.T.M.A.N-adv setup
2009-10-21 10:00 ` Sven Eckelmann
2009-10-21 12:00 ` Sven Eckelmann
@ 2009-10-21 12:11 ` Francesco
1 sibling, 0 replies; 17+ messages in thread
From: Francesco @ 2009-10-21 12:11 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking; +Cc: Marek Lindner
[-- Attachment #1: Type: text/plain, Size: 1099 bytes --]
Hi all,
Add the wlan0 interface to /proc/net/batman-adv/interfaces when wlan0 is up
actually seems to solve the problem.
Thanks.
On Wed, Oct 21, 2009 at 12:00 PM, Sven Eckelmann <sven.eckelmann@gmx.de>wrote:
> Francesco wrote:
> > Hi Andrew,
> > it (obviously) worked, i got the trunk, make and make install batctl
> after
> > batman-adv.
> >
> > Weird that:
> > $batctl o
> > BATMAN disabled - primary interface not active
> >
> > I just run this script:
> >
> > insmod /home/francesco/trunk/batman-adv-kernelland/batman-adv.ko
> > ifconfig wlan0 down
> > iwconfig wlan0 mode ad-hoc essid BATMAN_NET
> > echo wlan0 > /proc/net/batman-adv/interfaces
> > ifconfig wlan0 up
> > ifconfig bat0 192.168.1.1 up
> >
> > What is wrong?
>
> I think that you found a bug in batman-adv. Please add the wlan0 interface
> to
> /proc/net/batman-adv/interfaces when wlan0 is up.
>
> Best regards,
> Sven
>
> _______________________________________________
> B.A.T.M.A.N mailing list
> B.A.T.M.A.N@lists.open-mesh.net
> https://lists.open-mesh.net/mm/listinfo/b.a.t.m.a.n
>
>
--
Francesco Cappuccio
[-- Attachment #2: Type: text/html, Size: 1739 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* [B.A.T.M.A.N.] [PATCH] Start to send originator messages when interface gets active
2009-10-21 12:00 ` Sven Eckelmann
@ 2009-10-21 15:26 ` Sven Eckelmann
2009-10-21 17:21 ` [B.A.T.M.A.N.] [batman-adv] " Marek Lindner
0 siblings, 1 reply; 17+ messages in thread
From: Sven Eckelmann @ 2009-10-21 15:26 UTC (permalink / raw)
To: b.a.t.m.a.n
The module gets in a inactive state when all interfaces are down. This
stops the sending of new packets. When a interface gets activated again
it must reactivate the module and then start the sending of new
originator messages.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
---
batman-adv-kernelland/hard-interface.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/batman-adv-kernelland/hard-interface.c b/batman-adv-kernelland/hard-interface.c
index f04d2db..f954f4e 100644
--- a/batman-adv-kernelland/hard-interface.c
+++ b/batman-adv-kernelland/hard-interface.c
@@ -425,6 +425,13 @@ static int hard_if_event(struct notifier_block *this,
break;
case NETDEV_UP:
hardif_activate_interface(batman_if);
+ if ((atomic_read(&module_state) == MODULE_INACTIVE) &&
+ (hardif_get_active_if_num() > 0)) {
+ activate_module();
+
+ /* begin sending originator messages on that interface */
+ schedule_own_packet(batman_if);
+ }
break;
/* NETDEV_CHANGEADDR - mac address change - what are we doing here ? */
default:
--
1.6.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [B.A.T.M.A.N.] [batman-adv] Start to send originator messages when interface gets active
2009-10-21 15:26 ` [B.A.T.M.A.N.] [PATCH] Start to send originator messages when interface gets active Sven Eckelmann
@ 2009-10-21 17:21 ` Marek Lindner
0 siblings, 0 replies; 17+ messages in thread
From: Marek Lindner @ 2009-10-21 17:21 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
Please try this revised patch - it should avoid a race condition in which
we may end up with 2 schedule_own_packet() running at the same time.
The module gets in a inactive state when all interfaces are down. This
stops the sending of new packets. When a interface gets activated again
it must reactivate the module and then start the sending of new
originator messages.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
---
diff --git a/batman-adv-kernelland/hard-interface.c b/batman-adv-kernelland/hard-interface.c
index f04d2db..960e86c 100644
--- a/batman-adv-kernelland/hard-interface.c
+++ b/batman-adv-kernelland/hard-interface.c
@@ -425,6 +425,10 @@ static int hard_if_event(struct notifier_block *this,
break;
case NETDEV_UP:
hardif_activate_interface(batman_if);
+ if ((atomic_read(&module_state) == MODULE_INACTIVE) &&
+ (hardif_get_active_if_num() > 0)) {
+ activate_module();
+ }
break;
/* NETDEV_CHANGEADDR - mac address change - what are we doing here ? */
default:
diff --git a/batman-adv-kernelland/main.c b/batman-adv-kernelland/main.c
index 8fbefc2..4e70c95 100644
--- a/batman-adv-kernelland/main.c
+++ b/batman-adv-kernelland/main.c
@@ -173,7 +173,7 @@ end:
/* shuts down the whole module.*/
void shutdown_module(void)
{
- atomic_set(&module_state, MODULE_INACTIVE);
+ atomic_set(&module_state, MODULE_DEACTIVATING);
purge_outstanding_packets();
flush_workqueue(bat_event_workqueue);
@@ -199,6 +199,7 @@ void shutdown_module(void)
hardif_remove_interfaces();
synchronize_rcu();
+ atomic_set(&module_state, MODULE_INACTIVE);
}
void inc_module_count(void)
diff --git a/batman-adv-kernelland/main.h b/batman-adv-kernelland/main.h
index 21d3919..9493f96 100644
--- a/batman-adv-kernelland/main.h
+++ b/batman-adv-kernelland/main.h
@@ -63,7 +63,7 @@
#define MODULE_INACTIVE 0
#define MODULE_ACTIVE 1
-/* #define MODULE_WAITING 2 -- not needed anymore */
+#define MODULE_DEACTIVATING 2
/*
diff --git a/batman-adv-kernelland/send.c b/batman-adv-kernelland/send.c
index 73fe371..01396b4 100644
--- a/batman-adv-kernelland/send.c
+++ b/batman-adv-kernelland/send.c
@@ -399,7 +399,7 @@ void send_outstanding_bcast_packet(struct work_struct *work)
/* if we still have some more bcasts to send and we are not shutting
* down */
if ((forw_packet->num_packets < 3) &&
- (atomic_read(&module_state) != MODULE_INACTIVE))
+ (atomic_read(&module_state) != MODULE_DEACTIVATING))
_add_bcast_packet_to_list(forw_packet, ((5 * HZ) / 1000));
else
forw_packet_free(forw_packet);
@@ -424,7 +424,7 @@ void send_outstanding_bat_packet(struct work_struct *work)
* shutting down
*/
if ((forw_packet->own) &&
- (atomic_read(&module_state) != MODULE_INACTIVE))
+ (atomic_read(&module_state) != MODULE_DEACTIVATING))
schedule_own_packet(forw_packet->if_incoming);
forw_packet_free(forw_packet);
^ permalink raw reply related [flat|nested] 17+ messages in thread
end of thread, other threads:[~2009-10-21 17:21 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-20 15:02 [B.A.T.M.A.N.] basic B.A.T.M.A.N-adv setup Francesco
2009-10-20 15:17 ` Sven Eckelmann
2009-10-20 15:23 ` Sven Eckelmann
2009-10-20 16:02 ` Francesco
2009-10-20 17:10 ` Sven Eckelmann
2009-10-20 17:17 ` Sven Eckelmann
2009-10-20 19:59 ` Francesco
2009-10-20 20:22 ` Sven Eckelmann
2009-10-21 6:54 ` Francesco
2009-10-21 7:05 ` Andrew Lunn
2009-10-21 7:35 ` Francesco
2009-10-21 10:00 ` Sven Eckelmann
2009-10-21 12:00 ` Sven Eckelmann
2009-10-21 15:26 ` [B.A.T.M.A.N.] [PATCH] Start to send originator messages when interface gets active Sven Eckelmann
2009-10-21 17:21 ` [B.A.T.M.A.N.] [batman-adv] " Marek Lindner
2009-10-21 12:11 ` [B.A.T.M.A.N.] basic B.A.T.M.A.N-adv setup Francesco
2009-10-20 15:33 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox