[4/6] batman-adv:remove redundant is_my_mac() check in route_unicast_packet - callers deal with it

Message ID 1284674410-15477-4-git-send-email-an.langer@gmx.de (mailing list archive)
State Accepted, archived
Headers

Commit Message

Andreas Langer Sept. 16, 2010, 10 p.m. UTC
  Signed-off-by: Andreas Langer <an.langer at gmx.de>
---
 batman-adv/routing.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)
  

Patch

diff --git a/batman-adv/routing.c b/batman-adv/routing.c
index c1e32e6..5d17597 100644
--- a/batman-adv/routing.c
+++ b/batman-adv/routing.c
@@ -1145,12 +1145,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 "
@@ -1184,7 +1178,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--;