From patchwork Sun Nov 21 23:55:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 562 Return-Path: Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by open-mesh.org (Postfix) with SMTP id A946B1545A8 for ; Mon, 22 Nov 2010 00:56:05 +0100 (CET) Received: (qmail invoked by alias); 21 Nov 2010 23:56:05 -0000 Received: from vpnclient-194-112.hrz.tu-chemnitz.de (EHLO sven-desktop.lazhur.ath.cx) [134.109.194.112] by mail.gmx.net (mp071) with SMTP; 22 Nov 2010 00:56:05 +0100 X-Authenticated: #15668376 X-Provags-ID: V01U2FsdGVkX19pTKsdOCJp3P4yWJ5C6JLi0vgHWVLaDH/JpKWjV6 84fHJFghPdISh5 From: Sven Eckelmann To: greg@kroah.com Date: Mon, 22 Nov 2010 00:55:48 +0100 Message-Id: <1290383767-32602-11-git-send-email-sven.eckelmann@gmx.de> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1290383767-32602-1-git-send-email-sven.eckelmann@gmx.de> References: <1290383767-32602-1-git-send-email-sven.eckelmann@gmx.de> X-Y-GMX-Trusted: 0 Cc: b.a.t.m.a.n@lists.open-mesh.org Subject: [B.A.T.M.A.N.] [PATCH 10/29] Staging: batman-adv: remove redundant is_my_mac() check in route_unicast_packet X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.11 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: Sun, 21 Nov 2010 23:56:05 -0000 From: Andreas Langer Callers should check the if the received packet is for us before it calls route_unicast_packet. Signed-off-by: Andreas Langer Signed-off-by: Sven Eckelmann --- drivers/staging/batman-adv/routing.c | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c index d36c3f9..9b61d6b 100644 --- a/drivers/staging/batman-adv/routing.c +++ b/drivers/staging/batman-adv/routing.c @@ -1131,12 +1131,6 @@ static int route_unicast_packet(struct sk_buff *skb, unicast_packet = (struct unicast_packet *)skb->data; - /* packet for me */ - if (is_my_mac(unicast_packet->dest)) { - interface_rx(recv_if->soft_iface, skb, hdr_size); - return NET_RX_SUCCESS; - } - /* TTL exceeded */ if (unicast_packet->ttl < 2) { pr_debug("Warning - can't forward unicast packet from %pM to " @@ -1170,7 +1164,6 @@ static int route_unicast_packet(struct sk_buff *skb, return NET_RX_DROP; unicast_packet = (struct unicast_packet *)skb->data; - ethhdr = (struct ethhdr *)skb_mac_header(skb); /* decrement ttl */ unicast_packet->ttl--;