On Monday, December 05, 2011 20:13:42 Andrew Lunn wrote:
Changing routing protocol is something you don't want to accidentally do. So i think it should be reasonably hard to do, so you don't get any surprises. I would limit it to when the soft interface is down, and at other times return EBUSY. EBUSY seems like a reasonable good way to indicate the mesh is busy.
However, i think a cleanup call probably is needed, since the routing protocol will probably have its own internal state, memory allocations, etc which needs freeing when the mesh is going down.
The mesh is not going down when you bring down bat0. You can do whatever you want with bat0 - the mesh continues to operate normally. Only when a hard- interface goes down the routing information relying on that very interface are purged.
Here comes the chicken & egg problem: We can't have bat0 and its routing algorithm selection before we did not add at least one hard-interface.
Cheers, Marek