summaryrefslogtreecommitdiff
path: root/drivers/staging/batman-adv/routing.c
diff options
context:
space:
mode:
authorAndreas Langer <an.langer@gmx.de>2010-11-21 23:55:48 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2010-11-29 19:09:10 (GMT)
commitb8cd75445e842b11a0a8ff1e763303a575c21c77 (patch)
treee3f1220e50a4a953d3e9fffb684c2ccc745ecf03 /drivers/staging/batman-adv/routing.c
parentf3cc7595d242a22a9ffba91979d2cd4e4e815424 (diff)
downloadlinux-fsl-qoriq-b8cd75445e842b11a0a8ff1e763303a575c21c77.tar.xz
Staging: batman-adv: remove redundant is_my_mac() check in route_unicast_packet
Callers should check the if the received packet is for us before it calls route_unicast_packet. Signed-off-by: Andreas Langer <an.langer@gmx.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/batman-adv/routing.c')
-rw-r--r--drivers/staging/batman-adv/routing.c7
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--;