From 3878f1f075470990d9c2418b53f31694e774f743 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Linus=20L=C3=BCssing?= Date: Mon, 7 Feb 2011 00:14:40 +0000 Subject: [PATCH] batman-adv: Disallow originator addressing within mesh layer MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Sven Eckelmann --- net/batman-adv/unicast.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/net/batman-adv/unicast.c b/net/batman-adv/unicast.c index 6c92eefd1b81..1b5e761d8823 100644 --- a/net/batman-adv/unicast.c +++ b/net/batman-adv/unicast.c @@ -281,7 +281,7 @@ int unicast_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv) { struct ethhdr *ethhdr = (struct ethhdr *)skb->data; struct unicast_packet *unicast_packet; - struct orig_node *orig_node; + struct orig_node *orig_node = NULL; struct batman_if *batman_if; struct neigh_node *router; int data_len = skb->len; @@ -292,11 +292,6 @@ 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); - else - orig_node = ((struct orig_node *)hash_find(bat_priv->orig_hash, - compare_orig, - choose_orig, - ethhdr->h_dest)); /* check for hna host */ if (!orig_node) -- 2.34.1