提交 b8cd7544 编写于 作者: A Andreas Langer 提交者: Greg Kroah-Hartman

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: NAndreas Langer <an.langer@gmx.de>
Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 f3cc7595
......@@ -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--;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册