From 7c1fd91da5a5eecc91674991199940c05f87cb3a Mon Sep 17 00:00:00 2001 From: Antonio Quartulli Date: Sun, 23 Sep 2012 22:38:34 +0200 Subject: batman-adv: substitute tt_poss_change with a per-tt_entry flag tt_poss_change is a node-wide flag which tells whether the node is in a roaming state (a client recently moved to/away from it) in order to let it apply special re-routing rules. However this flag does not give a clear idea of the current state because it is not possible to understand *which client* is actually involved in the roaming. For this reason a better approach has been chosen: instead of using a node-wide variable, the roaming state is now given by a per-tt_entry ROAM flag which, in case of packet coming through the node, tells the node whether the real destination is in roaming state or not. With this flag change, batadv_check_unicast_ttvn() has also been rearranged in order to better fit the new re-routing logic and to be much more readable. Signed-off-by: Antonio Quartulli --- net/batman-adv/translation-table.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'net/batman-adv/translation-table.h') diff --git a/net/batman-adv/translation-table.h b/net/batman-adv/translation-table.h index 9fa4fe41c868..46d4451a59ee 100644 --- a/net/batman-adv/translation-table.h +++ b/net/batman-adv/translation-table.h @@ -59,6 +59,8 @@ int batadv_tt_append_diff(struct batadv_priv *bat_priv, int packet_min_len); bool batadv_tt_global_client_is_roaming(struct batadv_priv *bat_priv, uint8_t *addr); +bool batadv_tt_local_client_is_roaming(struct batadv_priv *bat_priv, + uint8_t *addr); bool batadv_tt_add_temporary_global_entry(struct batadv_priv *bat_priv, struct batadv_orig_node *orig_node, const unsigned char *addr); -- cgit v1.2.3