From: Sven Eckelmann <sven@narfation.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org,
"Linus Lüssing" <linus.luessing@ascom.ch>,
"Sven Eckelmann" <sven@narfation.org>
Subject: [PATCH 4/4] batman-adv: Disallow originator addressing within mesh layer
Date: Sat, 12 Feb 2011 00:21:43 +0100 [thread overview]
Message-ID: <1297466503-13246-5-git-send-email-sven@narfation.org> (raw)
In-Reply-To: <1297466503-13246-1-git-send-email-sven@narfation.org>
From: Linus Lüssing <linus.luessing@ascom.ch>
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>
---
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 6c92eef..1b5e761 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)
--
1.7.2.3
next prev parent reply other threads:[~2011-02-11 23:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-11 23:21 pull request: batman-adv 2011-02-12 Sven Eckelmann
[not found] ` <1297466503-13246-1-git-send-email-sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
2011-02-11 23:21 ` [PATCH 1/4] batman-adv: Use successive sequence numbers for fragments Sven Eckelmann
2011-02-11 23:21 ` [PATCH 2/4] batman-adv: Split combined variable declarations Sven Eckelmann
2011-02-11 23:21 ` [PATCH 3/4] batman-adv: Remove duplicate types.h inclusions Sven Eckelmann
2011-02-11 23:21 ` Sven Eckelmann [this message]
2011-02-12 5:21 ` pull request: batman-adv 2011-02-12 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1297466503-13246-5-git-send-email-sven@narfation.org \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=davem@davemloft.net \
--cc=linus.luessing@ascom.ch \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).