Hey Marek,
as per our IRC discussion, I'm removing this RFC patch as well as the
primary_addr caching in the bla code to avoid any debugging complexity with
this cache. I first introduced it to avoid code bloating to fetch/check/release
the primary_if in all the little functions, but I found an easy and non-bloating
way to do that. ;)
Regarding BLAII after this change, all functions hooked up somewhere (bla_rx(),
bla_tx(), bla_periodic_work(), ...) will more or less return as long as there
is no primary_if - it is needed to find out the own address after all.
When a new primary_if is chosen, the claim table and backbone gw table are wiped
to "simulate" a reboot - with the new interface, we might have new neighbors
in the mesh after all ...
The patch is already included in my blaII_dirty repo, I'll update and rebase
main patch series accordingly as there were no more comments in the last couple
of days.
Thanks
Simon
On Tue, Nov 01, 2011 at 11:08:47AM +0100, Marek Lindner wrote:
On Sunday, October 30, 2011 23:51:12 Simon Wunderlich
wrote:
Instead of acquiring the first interfaces
originator through
hard interface (including referencing/dereferencing), we can use the
cached value in bat_priv->own_orig.
There might be some cases where this function was implicitly used to
check whether there is a hard interface configured at all (i.e. if
batman is active), therfore this is patch is an RFC.
Most of the functions do not simply retrieve the addr but also check if there
is a primary interface. So, what happens if batman-adv has no primary_if ?
AFAIK that can occur if all added hard-interfaces are down.
What happens with BLAII if there is no primary interface ?
Cheers,
Marek