Re: [B.A.T.M.A.N.] [PATCH-maint 2/4] batman-adv: avoid keeping false temporary entry

Antonio Quartulli
2015-08-25T09:49:17Z

[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]

On 21/08/15 17:15, Simon Wunderlich wrote:
> In the case when a temporary entry is added first and a proper tt entry
> is added after that, the temporary tt entry is kept in the orig list.
> However the temporary flag is removed at this point, and therefore the
> purge function can not find this temporary entry anymore.
>
> Therefore, remove the previous temp entry before adding the new proper
> one.
>

[..]

> /* if the client was temporary added before receiving the first
> - * OGM announcing it, we have to clear the TEMP flag
> + * OGM announcing it, we have to clear the TEMP flag. Also,
> + * remove the previous temporary orig node and re-add it
> + * if required. If the orig entry changed, the new one which
> + * is a non-temporary entry is preferred.
> */
> - common->flags &= ~BATADV_TT_CLIENT_TEMP;
> + if (common->flags & BATADV_TT_CLIENT_TEMP) {
> + batadv_tt_global_del_orig_list(tt_global_entry);
> + common->flags &= ~BATADV_TT_CLIENT_TEMP;
> + }

mh...interesting..and nice catch. Have you tested this with a client
roaming from A to B during the "speedy join" period?

Cheers,

--
Antonio Quartulli

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]