[B.A.T.M.A.N.] [PATCHv4 maint] batman-adv: fix TT VLAN inconsistency on VLAN re-add
antonio at meshcoding.com
Sun May 4 17:41:50 CEST 2014
Please wait before reviewing this patch. I am performing some more
debugging on it and I think I found something else that might be wrong.
On 04/05/14 17:22, Antonio Quartulli wrote:
> From: Antonio Quartulli <antonio at open-mesh.com>
> When a VLAN interface (on top of batX) is removed and
> re-added within a short timeframe TT does not have enough
> time to properly cleanup. This creates an internal TT state
> mismatch as the newly created softif_vlan will be
> initialized from scratch with a TT client count of zero
> (even if TT entries for this VLAN still exist). The
> resulting TT messages are bogus due to the counter / tt
> client listing mismatch, thus creating inconsistencies on
> every node in the network
> To fix this issue destroy_vlan() has to not free the VLAN
> object immediately but it has to be kept alive until all the
> TT entries for this VLAN have been removed. destroy_vlan()
> still removes the sysfs folder so that the user has the
> feeling that everything went fine.
> If the same VLAN is re-added before the old object is free'd,
> then the latter is resurrected and re-used.
> Implement such behaviour by increasing the reference counter
> of a softif_vlan object every time a new local TT entry for
> such VLAN is created and remove the object from the list
> only when all the TT entries have been destroyed.
> Signed-off-by: Antonio Quartulli <antonio at open-mesh.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 901 bytes
Desc: OpenPGP digital signature
More information about the B.A.T.M.A.N