[B.A.T.M.A.N.] [PATCHv4 maint] batman-adv: fix TT VLAN inconsistency on VLAN re-add

Antonio Quartulli 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.

Cheers,

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>



-- 
Antonio Quartulli

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.open-mesh.org/pipermail/b.a.t.m.a.n/attachments/20140504/de3da996/attachment.sig>


More information about the B.A.T.M.A.N mailing list