diff options
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/soft-interface.c | 12 | ||||
-rw-r--r-- | net/batman-adv/translation-table.c | 15 |
2 files changed, 20 insertions, 7 deletions
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index 2d1f89517d99..54800c783f96 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
@@ -347,6 +347,12 @@ void batadv_interface_rx(struct net_device *soft_iface, | |||
347 | 347 | ||
348 | soft_iface->last_rx = jiffies; | 348 | soft_iface->last_rx = jiffies; |
349 | 349 | ||
350 | /* Let the bridge loop avoidance check the packet. If will | ||
351 | * not handle it, we can safely push it up. | ||
352 | */ | ||
353 | if (batadv_bla_rx(bat_priv, skb, vid, is_bcast)) | ||
354 | goto out; | ||
355 | |||
350 | if (orig_node) | 356 | if (orig_node) |
351 | batadv_tt_add_temporary_global_entry(bat_priv, orig_node, | 357 | batadv_tt_add_temporary_global_entry(bat_priv, orig_node, |
352 | ethhdr->h_source); | 358 | ethhdr->h_source); |
@@ -354,12 +360,6 @@ void batadv_interface_rx(struct net_device *soft_iface, | |||
354 | if (batadv_is_ap_isolated(bat_priv, ethhdr->h_source, ethhdr->h_dest)) | 360 | if (batadv_is_ap_isolated(bat_priv, ethhdr->h_source, ethhdr->h_dest)) |
355 | goto dropped; | 361 | goto dropped; |
356 | 362 | ||
357 | /* Let the bridge loop avoidance check the packet. If will | ||
358 | * not handle it, we can safely push it up. | ||
359 | */ | ||
360 | if (batadv_bla_rx(bat_priv, skb, vid, is_bcast)) | ||
361 | goto out; | ||
362 | |||
363 | netif_rx(skb); | 363 | netif_rx(skb); |
364 | goto out; | 364 | goto out; |
365 | 365 | ||
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 9f5705fcf426..582f13405df9 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c | |||
@@ -861,6 +861,12 @@ int batadv_tt_global_add(struct batadv_priv *bat_priv, | |||
861 | */ | 861 | */ |
862 | common->flags &= ~BATADV_TT_CLIENT_TEMP; | 862 | common->flags &= ~BATADV_TT_CLIENT_TEMP; |
863 | 863 | ||
864 | /* the change can carry possible "attribute" flags like the | ||
865 | * TT_CLIENT_WIFI, therefore they have to be copied in the | ||
866 | * client entry | ||
867 | */ | ||
868 | tt_global_entry->common.flags |= flags; | ||
869 | |||
864 | /* If there is the BATADV_TT_CLIENT_ROAM flag set, there is only | 870 | /* If there is the BATADV_TT_CLIENT_ROAM flag set, there is only |
865 | * one originator left in the list and we previously received a | 871 | * one originator left in the list and we previously received a |
866 | * delete + roaming change for this originator. | 872 | * delete + roaming change for this originator. |
@@ -1574,7 +1580,7 @@ batadv_tt_response_fill_table(uint16_t tt_len, uint8_t ttvn, | |||
1574 | 1580 | ||
1575 | memcpy(tt_change->addr, tt_common_entry->addr, | 1581 | memcpy(tt_change->addr, tt_common_entry->addr, |
1576 | ETH_ALEN); | 1582 | ETH_ALEN); |
1577 | tt_change->flags = BATADV_NO_FLAGS; | 1583 | tt_change->flags = tt_common_entry->flags; |
1578 | 1584 | ||
1579 | tt_count++; | 1585 | tt_count++; |
1580 | tt_change++; | 1586 | tt_change++; |
@@ -2545,6 +2551,13 @@ bool batadv_tt_add_temporary_global_entry(struct batadv_priv *bat_priv, | |||
2545 | { | 2551 | { |
2546 | bool ret = false; | 2552 | bool ret = false; |
2547 | 2553 | ||
2554 | /* if the originator is a backbone node (meaning it belongs to the same | ||
2555 | * LAN of this node) the temporary client must not be added because to | ||
2556 | * reach such destination the node must use the LAN instead of the mesh | ||
2557 | */ | ||
2558 | if (batadv_bla_is_backbone_gw_orig(bat_priv, orig_node->orig)) | ||
2559 | goto out; | ||
2560 | |||
2548 | if (!batadv_tt_global_add(bat_priv, orig_node, addr, | 2561 | if (!batadv_tt_global_add(bat_priv, orig_node, addr, |
2549 | BATADV_TT_CLIENT_TEMP, | 2562 | BATADV_TT_CLIENT_TEMP, |
2550 | atomic_read(&orig_node->last_ttvn))) | 2563 | atomic_read(&orig_node->last_ttvn))) |