Merge branch 'batman-adv/maint' of git://git.open-mesh.org/linux-merge

+22 -5
+22 -5
net/batman-adv/translation-table.c
··· 245 if (tt_global_entry) { 246 /* This node is probably going to update its tt table */ 247 tt_global_entry->orig_node->tt_poss_change = true; 248 - /* The global entry has to be marked as PENDING and has to be 249 * kept for consistency purpose */ 250 - tt_global_entry->flags |= TT_CLIENT_PENDING; 251 send_roam_adv(bat_priv, tt_global_entry->addr, 252 tt_global_entry->orig_node); 253 } ··· 696 const char *message, bool roaming) 697 { 698 struct tt_global_entry *tt_global_entry = NULL; 699 700 tt_global_entry = tt_global_hash_find(bat_priv, addr); 701 if (!tt_global_entry) ··· 704 705 if (tt_global_entry->orig_node == orig_node) { 706 if (roaming) { 707 - tt_global_entry->flags |= TT_CLIENT_ROAM; 708 - tt_global_entry->roam_at = jiffies; 709 - goto out; 710 } 711 _tt_global_del(bat_priv, tt_global_entry, message); 712 } 713 out: 714 if (tt_global_entry) 715 tt_global_entry_free_ref(tt_global_entry); 716 } 717 718 void tt_global_del_orig(struct bat_priv *bat_priv,
··· 245 if (tt_global_entry) { 246 /* This node is probably going to update its tt table */ 247 tt_global_entry->orig_node->tt_poss_change = true; 248 + /* The global entry has to be marked as ROAMING and has to be 249 * kept for consistency purpose */ 250 + tt_global_entry->flags |= TT_CLIENT_ROAM; 251 + tt_global_entry->roam_at = jiffies; 252 + 253 send_roam_adv(bat_priv, tt_global_entry->addr, 254 tt_global_entry->orig_node); 255 } ··· 694 const char *message, bool roaming) 695 { 696 struct tt_global_entry *tt_global_entry = NULL; 697 + struct tt_local_entry *tt_local_entry = NULL; 698 699 tt_global_entry = tt_global_hash_find(bat_priv, addr); 700 if (!tt_global_entry) ··· 701 702 if (tt_global_entry->orig_node == orig_node) { 703 if (roaming) { 704 + /* if we are deleting a global entry due to a roam 705 + * event, there are two possibilities: 706 + * 1) the client roamed from node A to node B => we mark 707 + * it with TT_CLIENT_ROAM, we start a timer and we 708 + * wait for node B to claim it. In case of timeout 709 + * the entry is purged. 710 + * 2) the client roamed to us => we can directly delete 711 + * the global entry, since it is useless now. */ 712 + tt_local_entry = tt_local_hash_find(bat_priv, 713 + tt_global_entry->addr); 714 + if (!tt_local_entry) { 715 + tt_global_entry->flags |= TT_CLIENT_ROAM; 716 + tt_global_entry->roam_at = jiffies; 717 + goto out; 718 + } 719 } 720 _tt_global_del(bat_priv, tt_global_entry, message); 721 } 722 out: 723 if (tt_global_entry) 724 tt_global_entry_free_ref(tt_global_entry); 725 + if (tt_local_entry) 726 + tt_local_entry_free_ref(tt_local_entry); 727 } 728 729 void tt_global_del_orig(struct bat_priv *bat_priv,