public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [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

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