From patchwork Fri Feb 11 23:21:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 800 Return-Path: Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id 73582154205 for ; Sat, 12 Feb 2011 00:22:02 +0100 (CET) Received: from sven-desktop.home.narfation.org (i59F6C012.versanet.de [89.246.192.18]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 27BED940AF; Sat, 12 Feb 2011 00:21:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=narfation.org; s=mail; t=1297466514; bh=wkConM2BEUV4f9PNY4grBk9hhu7pt4ipInhqDk2jQwI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type:Content-Transfer-Encoding; b=WWXxadlB/gp7xKXE6aHDOYBpRrLCbr3yCiXcOPE4V/V4om7Z4rMLzwBA5YPFni+nQ d+1BTQcHMMKcVaTXg+KcYhEIV4avXA10f6qL6OIdARGWq+fRhehgbvMx97Z1o3wo6g voQwBL7gqlWsouM9Aa0kCHq1vQ/YbBilSF0YCHis= From: Sven Eckelmann To: davem@davemloft.net Date: Sat, 12 Feb 2011 00:21:43 +0100 Message-Id: <1297466503-13246-5-git-send-email-sven@narfation.org> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1297466503-13246-1-git-send-email-sven@narfation.org> References: <1297466503-13246-1-git-send-email-sven@narfation.org> MIME-Version: 1.0 Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org, =?UTF-8?q?Linus=20L=C3=BCssing?= Subject: [B.A.T.M.A.N.] [PATCH 4/4] batman-adv: Disallow originator addressing within mesh layer X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Feb 2011 23:22:02 -0000 From: Linus Lüssing 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 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)