diff options
author | Linus Lüssing <linus.luessing@ascom.ch> | 2011-02-06 19:14:40 -0500 |
---|---|---|
committer | Sven Eckelmann <sven@narfation.org> | 2011-02-11 17:30:33 -0500 |
commit | 3878f1f075470990d9c2418b53f31694e774f743 (patch) | |
tree | 6ef77c4a0c44445cdee8b7d5b748d7ed29033716 /net/batman-adv/unicast.c | |
parent | ee1e884194eb19574898ce6d5eaef5e8afdec7f2 (diff) |
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>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/unicast.c')
-rw-r--r-- | net/batman-adv/unicast.c | 7 |
1 files changed, 1 insertions, 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) | |||
281 | { | 281 | { |
282 | struct ethhdr *ethhdr = (struct ethhdr *)skb->data; | 282 | struct ethhdr *ethhdr = (struct ethhdr *)skb->data; |
283 | struct unicast_packet *unicast_packet; | 283 | struct unicast_packet *unicast_packet; |
284 | struct orig_node *orig_node; | 284 | struct orig_node *orig_node = NULL; |
285 | struct batman_if *batman_if; | 285 | struct batman_if *batman_if; |
286 | struct neigh_node *router; | 286 | struct neigh_node *router; |
287 | int data_len = skb->len; | 287 | int data_len = skb->len; |
@@ -292,11 +292,6 @@ int unicast_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv) | |||
292 | /* get routing information */ | 292 | /* get routing information */ |
293 | if (is_multicast_ether_addr(ethhdr->h_dest)) | 293 | if (is_multicast_ether_addr(ethhdr->h_dest)) |
294 | orig_node = (struct orig_node *)gw_get_selected(bat_priv); | 294 | orig_node = (struct orig_node *)gw_get_selected(bat_priv); |
295 | else | ||
296 | orig_node = ((struct orig_node *)hash_find(bat_priv->orig_hash, | ||
297 | compare_orig, | ||
298 | choose_orig, | ||
299 | ethhdr->h_dest)); | ||
300 | 295 | ||
301 | /* check for hna host */ | 296 | /* check for hna host */ |
302 | if (!orig_node) | 297 | if (!orig_node) |