On Mon, Dec 05, 2011 at 07:35:06PM +0800, Marek Lindner wrote:
On Monday, December 05, 2011 19:27:26 Andrew Lunn wrote:
If i'm reading the patches correctly, it looks like you can change the algorithm at any time. Rather than making one algorithm deal with what ever state the previous algorithm left behind, would it not be better to only allow algorithm change when the soft interface is down and there is no local state?
Good point. Alternatively, we could add a cleanup call ?
Hi Marek
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.
Andrew