[B.A.T.M.A.N.] [PATCH] batman-adv: Increase purge timeout on DAT DHT candidates

Linus L├╝ssing linus.luessing at c0d3.blue
Sun Apr 7 13:09:38 CEST 2019


On Sun, Feb 10, 2019 at 07:59:59PM +0800, Marek Lindner wrote:
> Why not turn last_dht_update into a bool and apply the timeout length based on 
> that bool.

I wasn't sure how to smoothly toggle a DAT entry from local to
global or the other way round without adding locks, several
'if()'s and hackish adjustments of 'last_update'.


Therefore I went for a split the hash table in two in v3: One for
the DAT cache and one for the DAT DHT. Kind of similar to how we
have two tables for the TT for two distinct concepts as well.

While this might need a few more lines of code the result seemed
less complicated and cleaner.

Regards, Linus


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