Skip to content

Commit

Permalink
batman-adv: fix tt_global_entries flags update
Browse files Browse the repository at this point in the history
Flags carried by a change_entry have to be always copied into the
client entry as they may contain important attributes (e.g.
TT_CLIENT_WIFI).

For instance, a client added by means of the "early detection
mechanism" has no flag set at the beginning, so they must be updated once the
proper ADD event is received.

This was introduced by 30cfd02
("batman-adv: detect not yet announced clients")

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
  • Loading branch information
Antonio Quartulli committed Nov 16, 2012
1 parent 80d1178 commit e9c0013
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions net/batman-adv/translation-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,12 @@ int batadv_tt_global_add(struct batadv_priv *bat_priv,
*/
tt_global_entry->common.flags &= ~BATADV_TT_CLIENT_TEMP;

/* the change can carry possible "attribute" flags like the
* TT_CLIENT_WIFI, therefore they have to be copied in the
* client entry
*/
tt_global_entry->common.flags |= flags;

/* If there is the BATADV_TT_CLIENT_ROAM flag set, there is only
* one originator left in the list and we previously received a
* delete + roaming change for this originator.
Expand Down

0 comments on commit e9c0013

Please sign in to comment.