The following commit has been merged in the master branch: commit d4153dac1311f5b0403de0b0695ccb7e3e8c16a7 Author: Linus Lüssing linus.luessing@ascom.ch Date: Mon Feb 7 00:14:40 2011 +0000
batman-adv: Disallow originator addressing within mesh layer
For a host in the mesh network, the batman layer should be transparent. However, we had one exception, data packets within the mesh network which have the same destination as a originator are being routed to that node, although there is no host that node's bat0 interface and therefore gets dropped anyway. This commit removes this exception.
Signed-off-by: Linus Lüssing linus.luessing@ascom.ch
diff --git a/unicast.c b/unicast.c index 7b0cb0f..52b52e3 100644 --- a/unicast.c +++ b/unicast.c @@ -300,28 +300,12 @@ int unicast_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv) /* get routing information */ if (is_multicast_ether_addr(ethhdr->h_dest)) { orig_node = (struct orig_node *)gw_get_selected(bat_priv); - if (!orig_node) - goto trans_search; - - kref_get(&orig_node->refcount); - goto find_router; - } else { - rcu_read_lock(); - orig_node = ((struct orig_node *)hash_find(bat_priv->orig_hash, - compare_orig, - choose_orig, - ethhdr->h_dest)); - if (!orig_node) { - rcu_read_unlock(); - goto trans_search; + if (orig_node) { + kref_get(&orig_node->refcount); + goto find_router; } - - kref_get(&orig_node->refcount); - rcu_read_unlock(); - goto find_router; }
-trans_search: /* check for hna host - increases orig_node refcount */ orig_node = transtable_search(bat_priv, ethhdr->h_dest);