* [B.A.T.M.A.N.] Complete netifd integration in openwrt
@ 2013-07-29 0:03 Gui Iribarren
2013-07-29 0:39 ` cmsv
0 siblings, 1 reply; 3+ messages in thread
From: Gui Iribarren @ 2013-07-29 0:03 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
Hello folks,
i finally took the time to finish the netifd integration in openwrt.
since 2013.0.0, the "slave interfaces" moved from
batman-adv.bat0.interfaces to network.meshblah.proto=batadv, so that
netifd could properly manage the setup and teardown, avoiding some race
conditions i faced at that time (about a year ago)
now i did the same for the "mesh interface", batX, which until now had
the parameters still set in /etc/config/batman-adv.
### So, what in 2012.4.0 was
# cat /etc/config/batman-adv
config 'mesh' 'bat0'
option 'interfaces' 'mesh0'
option 'ap_isolation' '1'
option 'gw_mode' 'server'
# cat /etc/config/network
config interface 'mesh0'
option ifname 'eth2'
option proto 'none'
option auto '1'
### now fully turns into:
# cat /etc/config/network
config interface 'bat0'
option proto 'batmesh'
option ifname 'bat0'
option ap_isolation '1'
option gw_mode 'server'
config interface 'mesh0'
option ifname 'eth2'
option proto 'batadv'
option mesh 'bat0'
[about the proto name... since proto=batadv was already taken for slave
interfaces, i couldn't come up with anything better than "batmesh" :(
I was talking with Nico just now, and he suggested "batadvmesh"
in any case, suggestions are much welcome. Anyway, proto=bat.*mesh is
for setting the mesh parameters]
and well, to avoid breaking current configs unnecesarily [over
sysupgrades (or opkg upgrades?)] i included a small uci-defaults
migration script to take care of that; it transparently migrates all
current /etc/config/batman-adv settings to netifd-style.
Why the integration? reliability in the setup; no more race conditions
whatsoever at boot, or runtime: i even tried rmmoding the module, and
doing "ifup mesh0" brought everything up again cleanly. while netifd had
some stigmas when it was born, now (in my experience) it has grown to a
pretty solid nifty daemon.
I made a pull request on
https://github.com/openwrt-routing/packages/pull/4
comments welcome :D
if you prefer [PATCHES] over mail, just ask :)
as always, cheers, and thanks for being so cool people!
Gui
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [B.A.T.M.A.N.] Complete netifd integration in openwrt
2013-07-29 0:03 [B.A.T.M.A.N.] Complete netifd integration in openwrt Gui Iribarren
@ 2013-07-29 0:39 ` cmsv
2013-07-29 1:18 ` Gui Iribarren
0 siblings, 1 reply; 3+ messages in thread
From: cmsv @ 2013-07-29 0:39 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
[-- Attachment #1.1: Type: text/plain, Size: 2714 bytes --]
Is this change going to be in efect with current openwrt AA and
batman-adv 2013.3.0 or still optional ?
On 07/28/2013 08:03 PM, Gui Iribarren wrote:
> Hello folks,
> i finally took the time to finish the netifd integration in openwrt.
> since 2013.0.0, the "slave interfaces" moved from
> batman-adv.bat0.interfaces to network.meshblah.proto=batadv, so that
> netifd could properly manage the setup and teardown, avoiding some race
> conditions i faced at that time (about a year ago)
> now i did the same for the "mesh interface", batX, which until now had
> the parameters still set in /etc/config/batman-adv.
>
> ### So, what in 2012.4.0 was
>
> # cat /etc/config/batman-adv
> config 'mesh' 'bat0'
> option 'interfaces' 'mesh0'
> option 'ap_isolation' '1'
> option 'gw_mode' 'server'
>
> # cat /etc/config/network
> config interface 'mesh0'
> option ifname 'eth2'
> option proto 'none'
> option auto '1'
>
> ### now fully turns into:
Now as for batman-adv 2013.3.0 already in effect?
>
> # cat /etc/config/network
> config interface 'bat0'
> option proto 'batmesh'
> option ifname 'bat0'
> option ap_isolation '1'
> option gw_mode 'server'
>
> config interface 'mesh0'
> option ifname 'eth2'
> option proto 'batadv'
> option mesh 'bat0'
also valid for all previous /etc/config/batman-adv available options or
just the ones you wrote here?
>
> [about the proto name... since proto=batadv was already taken for slave
> interfaces, i couldn't come up with anything better than "batmesh" :(
> I was talking with Nico just now, and he suggested "batadvmesh"
> in any case, suggestions are much welcome. Anyway, proto=bat.*mesh is
> for setting the mesh parameters]
>
> and well, to avoid breaking current configs unnecesarily [over
> sysupgrades (or opkg upgrades?)] i included a small uci-defaults
> migration script to take care of that; it transparently migrates all
> current /etc/config/batman-adv settings to netifd-style.
>
> Why the integration? reliability in the setup; no more race conditions
> whatsoever at boot, or runtime: i even tried rmmoding the module, and
> doing "ifup mesh0" brought everything up again cleanly. while netifd had
> some stigmas when it was born, now (in my experience) it has grown to a
> pretty solid nifty daemon.
>
> I made a pull request on
> https://github.com/openwrt-routing/packages/pull/4
> comments welcome :D
if accepted will it be patched in 2013.3.0 or added to the next release?
>
> if you prefer [PATCHES] over mail, just ask :)
>
> as always, cheers, and thanks for being so cool people!
>
> Gui
>
[-- Attachment #1.2: 0x782BF73E.asc --]
[-- Type: application/pgp-keys, Size: 36799 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [B.A.T.M.A.N.] Complete netifd integration in openwrt
2013-07-29 0:39 ` cmsv
@ 2013-07-29 1:18 ` Gui Iribarren
0 siblings, 0 replies; 3+ messages in thread
From: Gui Iribarren @ 2013-07-29 1:18 UTC (permalink / raw)
To: cmsv; +Cc: The list for a Better Approach To Mobile Ad-hoc Networking
On 07/28/2013 09:39 PM, cmsv wrote:
> Is this change going to be in efect with current openwrt AA and
> batman-adv 2013.3.0 or still optional ?
Aw, sorry for the confusion, bad timing :(
batman-adv 2013.3.0 is already released, and this particular patch is
still a pull request , so: no, this is still just an idea.
batman-adv 2013.3.0 has no config style changes AFAIK
>> # cat /etc/config/network
>> config interface 'bat0'
>> option proto 'batmesh'
>> option ifname 'bat0'
>> option ap_isolation '1'
>> option gw_mode 'server'
>>
>> config interface 'mesh0'
>> option ifname 'eth2'
>> option proto 'batadv'
>> option mesh 'bat0'
>
> also valid for all previous /etc/config/batman-adv available options or
> just the ones you wrote here?
Yes, all available options as of today. This was just a short example :)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-29 1:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-29 0:03 [B.A.T.M.A.N.] Complete netifd integration in openwrt Gui Iribarren
2013-07-29 0:39 ` cmsv
2013-07-29 1:18 ` Gui Iribarren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox