Skip to content

Commit

Permalink
batman-adv: Disallow originator addressing within mesh layer
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
  • Loading branch information
Linus Lüssing authored and Sven Eckelmann committed Feb 11, 2011
1 parent ee1e884 commit 3878f1f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions net/batman-adv/unicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit 3878f1f

Please sign in to comment.