diff options
Diffstat (limited to 'net/batman-adv/translation-table.c')
-rw-r--r-- | net/batman-adv/translation-table.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 112edd371b2f..baae71585804 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c | |||
@@ -769,6 +769,12 @@ int batadv_tt_global_add(struct batadv_priv *bat_priv, | |||
769 | */ | 769 | */ |
770 | tt_global_entry->common.flags &= ~BATADV_TT_CLIENT_TEMP; | 770 | tt_global_entry->common.flags &= ~BATADV_TT_CLIENT_TEMP; |
771 | 771 | ||
772 | /* the change can carry possible "attribute" flags like the | ||
773 | * TT_CLIENT_WIFI, therefore they have to be copied in the | ||
774 | * client entry | ||
775 | */ | ||
776 | tt_global_entry->common.flags |= flags; | ||
777 | |||
772 | /* If there is the BATADV_TT_CLIENT_ROAM flag set, there is only | 778 | /* If there is the BATADV_TT_CLIENT_ROAM flag set, there is only |
773 | * one originator left in the list and we previously received a | 779 | * one originator left in the list and we previously received a |
774 | * delete + roaming change for this originator. | 780 | * delete + roaming change for this originator. |
@@ -1496,7 +1502,7 @@ batadv_tt_response_fill_table(uint16_t tt_len, uint8_t ttvn, | |||
1496 | 1502 | ||
1497 | memcpy(tt_change->addr, tt_common_entry->addr, | 1503 | memcpy(tt_change->addr, tt_common_entry->addr, |
1498 | ETH_ALEN); | 1504 | ETH_ALEN); |
1499 | tt_change->flags = BATADV_NO_FLAGS; | 1505 | tt_change->flags = tt_common_entry->flags; |
1500 | 1506 | ||
1501 | tt_count++; | 1507 | tt_count++; |
1502 | tt_change++; | 1508 | tt_change++; |
@@ -2450,6 +2456,13 @@ bool batadv_tt_add_temporary_global_entry(struct batadv_priv *bat_priv, | |||
2450 | { | 2456 | { |
2451 | bool ret = false; | 2457 | bool ret = false; |
2452 | 2458 | ||
2459 | /* if the originator is a backbone node (meaning it belongs to the same | ||
2460 | * LAN of this node) the temporary client must not be added because to | ||
2461 | * reach such destination the node must use the LAN instead of the mesh | ||
2462 | */ | ||
2463 | if (batadv_bla_is_backbone_gw_orig(bat_priv, orig_node->orig)) | ||
2464 | goto out; | ||
2465 | |||
2453 | if (!batadv_tt_global_add(bat_priv, orig_node, addr, | 2466 | if (!batadv_tt_global_add(bat_priv, orig_node, addr, |
2454 | BATADV_TT_CLIENT_TEMP, | 2467 | BATADV_TT_CLIENT_TEMP, |
2455 | atomic_read(&orig_node->last_ttvn))) | 2468 | atomic_read(&orig_node->last_ttvn))) |