Bug #164 » batman-adv_002_fix_softiface_mac_update_remove_old_tt_entry.patch
soft-interface.c.ORG2 2012-09-06 10:27:07.030979369 +0200 → soft-interface.c 2012-09-06 10:30:46.000000000 +0200 | ||
---|---|---|
/* only modify transtable if it has been initialized before */
|
||
if (atomic_read(&bat_priv->mesh_state) == BATADV_MESH_ACTIVE) {
|
||
batadv_tt_local_remove(bat_priv, dev->dev_addr,
|
||
"mac address changed", false);
|
||
"mac address changed", false, true);
|
||
memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
|
||
batadv_tt_local_add(dev, addr->sa_data, BATADV_NULL_IFINDEX);
|
||
}else{
|
||
-- a/translation-table.c.ORG 2012-09-06 10:27:23.127055983 +0200
|
||
++ b/translation-table.c 2012-09-06 10:30:24.000000000 +0200
|
||
... | ... | |
}
|
||
void batadv_tt_local_remove(struct batadv_priv *bat_priv, const uint8_t *addr,
|
||
const char *message, bool roaming)
|
||
const char *message, bool roaming, bool force)
|
||
{
|
||
struct batadv_tt_local_entry *tt_local_entry = NULL;
|
||
uint16_t flags;
|
||
... | ... | |
if (roaming)
|
||
flags |= BATADV_TT_CLIENT_ROAM;
|
||
if(force)
|
||
tt_local_entry->common.flags &= ~BATADV_TT_CLIENT_NOPURGE;
|
||
batadv_tt_local_set_pending(bat_priv, tt_local_entry, flags, message);
|
||
out:
|
||
if (tt_local_entry)
|
||
... | ... | |
/* remove address from local hash if present */
|
||
batadv_tt_local_remove(bat_priv, tt_global_entry->common.addr,
|
||
"global tt received",
|
||
flags & BATADV_TT_CLIENT_ROAM);
|
||
flags & BATADV_TT_CLIENT_ROAM, false);
|
||
ret = 1;
|
||
out:
|
||
if (tt_global_entry)
|
||
-- a/translation-table.h.ORG 2012-09-06 10:26:54.910921682 +0200
|
||
++ b/translation-table.h 2012-09-06 10:29:26.000000000 +0200
|
||
... | ... | |
int ifindex);
|
||
void batadv_tt_local_remove(struct batadv_priv *bat_priv,
|
||
const uint8_t *addr, const char *message,
|
||
bool roaming);
|
||
bool roaming, bool force);
|
||
int batadv_tt_local_seq_print_text(struct seq_file *seq, void *offset);
|
||
void batadv_tt_global_add_orig(struct batadv_priv *bat_priv,
|
||
struct batadv_orig_node *orig_node,
|